"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
drive: fix some google docs being treated as files - fixes #5455
Nick Craig-Wood94b1439299e5
diff --git a/backend/drive/drive.go b/backend/drive/drive.goindex 240e6a189..29185b1cd 100755--- a/backend/drive/drive.go+++ b/backend/drive/drive.go@@ -1321,8 +1321,8 @@ func (f *Fs) newLinkObject(remote string, info *drive.File, extension, exportMim//// When the drive.File cannot be represented as an fs.Object it will return (nil, nil).func (f *Fs) newObjectWithInfo(ctx context.Context, remote string, info *drive.File) (fs.Object, error) {- // If item has MD5 sum or a length it is a file stored on drive- if info.Md5Checksum != "" || info.Size > 0 {+ // If item has MD5 sum it is a file stored on drive+ if info.Md5Checksum != "" {return f.newRegularObject(remote, info), nil}@@ -1355,8 +1355,8 @@ func (f *Fs) newObjectWithExportInfo(// Pretend a dangling shortcut is a regular object// It will error if used, but appear in listings so it can be deletedreturn f.newRegularObject(remote, info), nil- case info.Md5Checksum != "" || info.Size > 0:- // If item has MD5 sum or a length it is a file stored on drive+ case info.Md5Checksum != "":+ // If item has MD5 sum it is a file stored on drivereturn f.newRegularObject(remote, info), nilcase f.opt.SkipGdocs:fs.Debugf(remote, "Skipping google document type %q", info.MimeType)