"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 Server Side Copy with Temp Upload
Brandon McNama19ff7c9302aa
diff --git a/backend/cache/cache.go b/backend/cache/cache.goindex 8b1263cad..98ebe79b0 100644--- a/backend/cache/cache.go+++ b/backend/cache/cache.go@@ -520,9 +520,6 @@ func NewFs(name, rootPath string, m configmap.Mapper) (fs.Fs, error) {// override only those features that use a temp fs and it doesn't support them//f.features.ChangeNotify = f.ChangeNotifyif f.opt.TempWritePath != "" {- if f.tempFs.Features().Copy == nil {- f.features.Copy = nil- }if f.tempFs.Features().Move == nil {f.features.Move = nil}@@ -1533,6 +1530,9 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,fs.Errorf(src, "source remote (%v) doesn't support Copy", src.Fs())return nil, fs.ErrorCantCopy}+ if f.opt.TempWritePath != "" && src.Fs() == f.tempFs {+ return nil, fs.ErrorCantCopy+ }// the source must be a cached object or we abortsrcObj, ok := src.(*Object)if !ok {diff --git a/cmd/backend/backend.go b/cmd/backend/backend.goindex 2d32ff447..12c5a3f33 100644--- a/cmd/backend/backend.go+++ b/cmd/backend/backend.go@@ -59,7 +59,7 @@ Note to run these commands on a running backend then see[backend/command](/rc/#backend/command) in the rc docs.`,RunE: func(command *cobra.Command, args []string) error {- cmd.CheckArgs(2, 1E6, command, args)+ cmd.CheckArgs(2, 1e6, command, args)name, remote := args[0], args[1]cmd.Run(false, false, command, func() error {// show help if remote is a backend name