Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

operations: fix Move godoc to note Copy fallback is accounted as a transfer - fixes #8799

Søren Lindberga1d906fd3d28
diff --git a/fs/operations/operations.go b/fs/operations/operations.go
index 88daa6c91..eb45a3136 100644
--- a/fs/operations/operations.go
+++ b/fs/operations/operations.go
@@ -416,7 +416,9 @@ func SameObject(src, dst fs.Object) bool {
// It returns the destination object if possible. Note that this may
// be nil.
//
-// This is accounted as a check.
+// This is accounted as a check, unless Move falls back to Copy + Delete
+// (on backends without server-side move), in which case the Copy is
+// accounted as a transfer.
func Move(ctx context.Context, fdst fs.Fs, dst fs.Object, remote string, src fs.Object) (newDst fs.Object, err error) {
return move(ctx, fdst, dst, remote, src, false)
}