"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
cache: fix error return value of cache/fetch rc method
Fabian Möllerdeda09363762
diff --git a/backend/cache/cache.go b/backend/cache/cache.goindex 88c98a894..43679c3aa 100644--- a/backend/cache/cache.go+++ b/backend/cache/cache.go@@ -666,7 +666,7 @@ func (f *Fs) rcFetch(in rc.Params) (rc.Params, error) {}}type fileStatus struct {- Error error+ Error stringFetchedChunks int}fetchedChunks := make(map[string]fileStatus, len(files))@@ -675,13 +675,13 @@ func (f *Fs) rcFetch(in rc.Params) (rc.Params, error) {var status fileStatuso, err := f.NewObject(remote)if err != nil {- status.Error = err+ fetchedChunks[file] = fileStatus{Error: err.Error()}continue}co := o.(*Object)err = co.refreshFromSource(true)if err != nil {- status.Error = err+ fetchedChunks[file] = fileStatus{Error: err.Error()}continue}handle := NewObjectHandle(co, f)@@ -690,8 +690,8 @@ func (f *Fs) rcFetch(in rc.Params) (rc.Params, error) {walkChunkRanges(crs, co.Size(), func(chunk int64) {_, err := handle.getChunk(chunk * f.ChunkSize())if err != nil {- if status.Error == nil {- status.Error = err+ if status.Error == "" {+ status.Error = err.Error()}} else {status.FetchedChunks++