"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
core: Fix race detected by go race detector
Nick Craig-Woode09ef62d5b78
diff --git a/fs/operations.go b/fs/operations.goindex 6b56792e5..28bed028b 100644--- a/fs/operations.go+++ b/fs/operations.go@@ -4,7 +4,6 @@ package fsimport ("fmt"- "log""sync")@@ -225,12 +224,10 @@ func Copier(in ObjectPairChan, fdst Fs, wg *sync.WaitGroup) {func DeleteFiles(to_be_deleted ObjectsChan) {var wg sync.WaitGroupwg.Add(Config.Transfers)- var fs Fsfor i := 0; i < Config.Transfers; i++ {go func() {defer wg.Done()for dst := range to_be_deleted {- fs = dst.Fs()if Config.DryRun {Debug(dst, "Not deleting as --dry-run")} else {@@ -247,8 +244,7 @@ func DeleteFiles(to_be_deleted ObjectsChan) {}}()}-- Log(fs, "Waiting for deletions to finish")+ Log(nil, "Waiting for deletions to finish")wg.Wait()}@@ -520,7 +516,6 @@ func Purge(f Fs) error {}} else {DeleteFiles(f.List())- log.Printf("Deleting path")Rmdir(f)}return nildiff --git a/notes.txt b/notes.txtindex 054c579e8..8ee47cb0b 100644--- a/notes.txt+++ b/notes.txt@@ -3,6 +3,12 @@ Remove FIXME skipping directoryChange lsd command so it doesn't show -1* Make sure all Fses show -1 for objects Zero for dates etc+Make unit tests for the fses+ * Make them try to load a TestFSName config+ * Then do a proper unit test of each one+ * If there is no TestFSName config it should exit quietly+ * However the Local FS should default to a tmpdir+Todo* FIXME: More -dry-run checks for object transfer* Might be quicker to check md5sums first? for swift <-> swift certainly, and maybe for small files