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

yandex: handle api error on server-side move

albertony3e9c5eca3bfb
diff --git a/backend/yandex/yandex.go b/backend/yandex/yandex.go
index 3097a8bc9..7f0ddc5d8 100644
--- a/backend/yandex/yandex.go
+++ b/backend/yandex/yandex.go
@@ -782,11 +782,10 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string
}
_, err = f.readMetaDataForPath(ctx, dstPath, &api.ResourceInfoRequestOptions{})
- if _, ok := err.(*api.ErrorResponse); ok {
- // does not exist
- //if apiErr.ErrorName == "DiskNotFoundError" {
- // // OK
- //}
+ if apiErr, ok := err.(*api.ErrorResponse); ok {
+ if apiErr.ErrorName != "DiskNotFoundError" {
+ return err
+ }
} else if err != nil {
return err
} else {