mirror of
https://github.com/rclone/rclone.git
synced 2024-12-24 16:09:01 +01:00
Add Drive specific option: --drive-skip-gdocs - fixes #1035
This commit is contained in:
parent
74702554da
commit
cbc113492a
@ -203,6 +203,10 @@ Here are the possible extensions with their corresponding mime types.
|
||||
| xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Microsoft Office Spreadsheet |
|
||||
| zip | application/zip | A ZIP file of HTML, Images CSS |
|
||||
|
||||
#### --drive-skip-gdocs ####
|
||||
|
||||
Skip google documents in all listings. If given, gdocs practically become invisible to rclone.
|
||||
|
||||
### Limitations ###
|
||||
|
||||
Drive has quite a lot of rate limiting. This causes rclone to be
|
||||
|
@ -44,6 +44,7 @@ var (
|
||||
driveFullList = fs.BoolP("drive-full-list", "", false, "Use a full listing for directory list. More data but usually quicker. (obsolete)")
|
||||
driveAuthOwnerOnly = fs.BoolP("drive-auth-owner-only", "", false, "Only consider files owned by the authenticated user. Requires drive-full-list.")
|
||||
driveUseTrash = fs.BoolP("drive-use-trash", "", false, "Send files to the trash instead of deleting permanently.")
|
||||
driveSkipGdocs = fs.BoolP("drive-skip-gdocs", "", false, "Skip google documents in all listings.")
|
||||
driveExtensions = fs.StringP("drive-formats", "", defaultExtensions, "Comma separated list of preferred formats for downloading Google docs.")
|
||||
// chunkSize is the size of the chunks created during a resumable upload and should be a power of two.
|
||||
// 1<<18 is the minimum size supported by the Google uploader, and there is no maximum.
|
||||
@ -494,12 +495,16 @@ func (f *Fs) ListDir(out fs.ListOpts, job dircache.ListDirJob) (jobs []dircache.
|
||||
out.SetError(err)
|
||||
return true
|
||||
}
|
||||
obj := o.(*Object)
|
||||
obj.isDocument = true
|
||||
obj.url = link
|
||||
obj.bytes = -1
|
||||
if out.Add(o) {
|
||||
return true
|
||||
if !*driveSkipGdocs {
|
||||
obj := o.(*Object)
|
||||
obj.isDocument = true
|
||||
obj.url = link
|
||||
obj.bytes = -1
|
||||
if out.Add(o) {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
fs.Debug(f, "Skip google document: %q", remote)
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user