forked from TrueCloudLab/rclone
onedrive: fix overwrite detection in Copy - fixes #1224
This commit is contained in:
parent
488353c977
commit
f046c00d3b
1 changed files with 4 additions and 2 deletions
|
@ -600,8 +600,10 @@ func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if strings.ToLower(srcObj.remote) == strings.ToLower(remote) {
|
||||
return nil, errors.Errorf("can't copy %q -> %q as are same name when lowercase", srcObj.remote, remote)
|
||||
srcPath := srcObj.fs.rootSlash() + srcObj.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
|
||||
|
|
Loading…
Reference in a new issue