"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
vfs: Fix race condition in vfscache
Nick Craig-Wood530dc77cdefd
diff --git a/vfs/vfscache/item.go b/vfs/vfscache/item.goindex 9d27d57c8..ca759ba67 100644--- a/vfs/vfscache/item.go+++ b/vfs/vfscache/item.go@@ -488,8 +488,9 @@ func (item *Item) _store(ctx context.Context, storeFn StoreFn) (err error) {// Object has disappeared if cacheObj == nilif cacheObj != nil {+ o, name := item.o, item.nameitem.mu.Unlock()- o, err := operations.Copy(ctx, item.c.fremote, item.o, item.name, cacheObj)+ o, err := operations.Copy(ctx, item.c.fremote, o, name, cacheObj)item.mu.Lock()if err != nil {return errors.Wrap(err, "vfs cache: failed to transfer file from cache to remote")