"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
Remove duplicate check for filter IncludeObject
Nick Craig-Wood12b51c5eb8c4
diff --git a/fs/operations.go b/fs/operations.goindex 89a89b27b..8e93a09aa 100644--- a/fs/operations.go+++ b/fs/operations.go@@ -456,11 +456,13 @@ func syncCopyMove(fdst, fsrc Fs, Delete bool, DoMove bool) error {var srcFiles map[string]Objectvar srcObjects = make(ObjectsChan, Config.Transfers)+ // Read dst files including excluded files if DeleteExcluded is setgo func() {dstFiles = readFilesMap(fdst, Config.Filter.DeleteExcluded)listWg.Done()}()+ // Read src file not including excluded filesgo func() {srcFiles = readFilesMap(fsrc, false)listWg.Done()@@ -543,16 +545,12 @@ func syncCopyMove(fdst, fsrc Fs, Delete bool, DoMove bool) error {go func() {for src := range srcObjects {- if !Config.Filter.IncludeObject(src) {- Debug(src, "Excluding from sync")+ remote := src.Remote()+ if dst, dstFound := dstFiles[remote]; dstFound {+ toBeChecked <- ObjectPair{src, dst}} else {- remote := src.Remote()- if dst, dstFound := dstFiles[remote]; dstFound {- toBeChecked <- ObjectPair{src, dst}- } else {- // No need to check since doesn't exist- toBeUploaded <- ObjectPair{src, nil}- }+ // No need to check since doesn't exist+ toBeUploaded <- ObjectPair{src, nil}}}close(toBeChecked)