mirror of
https://github.com/rclone/rclone.git
synced 2025-02-23 00:11:53 +08:00
onedrive: fix overwrite detection in Copy - fixes #1224
This commit is contained in:
parent
488353c977
commit
f046c00d3b
@ -600,8 +600,10 @@ func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.ToLower(srcObj.remote) == strings.ToLower(remote) {
|
srcPath := srcObj.fs.rootSlash() + srcObj.remote
|
||||||
return nil, errors.Errorf("can't copy %q -> %q as are same name when lowercase", srcObj.remote, remote)
|
dstPath := f.rootSlash() + remote
|
||||||
|
if strings.ToLower(srcPath) == strings.ToLower(dstPath) {
|
||||||
|
return nil, errors.Errorf("can't copy %q -> %q as are same name when lowercase", srcPath, dstPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create temporary object
|
// Create temporary object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user