"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
drive: make DirMove more efficient and complain about moving the root
Nick Craig-Woodd132dc7640a2
diff --git a/drive/drive.go b/drive/drive.goindex 14039a7b1..ec4b57d94 100644--- a/drive/drive.go+++ b/drive/drive.go@@ -771,12 +771,16 @@ func (f *Fs) DirMove(src fs.Fs) error {}// Check if destination exists- f.dirCache.ResetRoot()- err := f.dirCache.FindRoot(false)- if err == nil {+ if f.dirCache.FoundRoot() {return fs.ErrorDirExists}+ // Refuse to move to or from the root+ if f.root == "" || srcFs.root == "" {+ fs.Debug(src, "DirMove error: Can't move root")+ return errors.New("can't move root directory")+ }+// Find ID of parentleaf, directoryID, err := f.dirCache.FindPath(f.root, true)if err != nil {