"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: Don't return nil Object with nil error from newObject* functions.
Nick Craig-Wood2f5a2d3c48ba
diff --git a/backend/drive/drive.go b/backend/drive/drive.goindex f47f79d2a..5ac8f3f7e 100755--- a/backend/drive/drive.go+++ b/backend/drive/drive.go@@ -1281,16 +1281,16 @@ func (f *Fs) newObjectWithExportInfo(return f.newRegularObject(remote, info), nilcase f.opt.SkipGdocs:fs.Debugf(remote, "Skipping google document type %q", info.MimeType)- return nil, nil+ return nil, fs.ErrorObjectNotFounddefault:// If item MimeType is in the ExportFormats then it is a google docif !isDocument {fs.Debugf(remote, "Ignoring unknown document type %q", info.MimeType)- return nil, nil+ return nil, fs.ErrorObjectNotFound}if extension == "" {fs.Debugf(remote, "No export formats found for %q", info.MimeType)- return nil, nil+ return nil, fs.ErrorObjectNotFound}if isLinkMimeType(exportMimeType) {return f.newLinkObject(remote, info, extension, exportMimeType)@@ -1801,7 +1801,11 @@ func (f *Fs) itemToDirEntry(remote string, item *drive.File) (fs.DirEntry, errorcase f.opt.AuthOwnerOnly && !isAuthOwned(item):// ignore objectdefault:- return f.newObjectWithInfo(remote, item)+ entry, err = f.newObjectWithInfo(remote, item)+ if err == fs.ErrorObjectNotFound {+ return nil, nil+ }+ return entry, err}return nil, nil}