forked from TrueCloudLab/rclone
yandex: handle api error on server-side move
This commit is contained in:
parent
a1fd60ec2b
commit
3e9c5eca3b
1 changed files with 4 additions and 5 deletions
|
@ -782,11 +782,10 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = f.readMetaDataForPath(ctx, dstPath, &api.ResourceInfoRequestOptions{})
|
_, err = f.readMetaDataForPath(ctx, dstPath, &api.ResourceInfoRequestOptions{})
|
||||||
if _, ok := err.(*api.ErrorResponse); ok {
|
if apiErr, ok := err.(*api.ErrorResponse); ok {
|
||||||
// does not exist
|
if apiErr.ErrorName != "DiskNotFoundError" {
|
||||||
//if apiErr.ErrorName == "DiskNotFoundError" {
|
return err
|
||||||
// // OK
|
}
|
||||||
//}
|
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue