Stop --track-renames deleting case folded source files - fixes #1094
What was happening is that when Move was implemented as Copy + Delete, MoveFile was seeing the files didn't need transferring (because they were identical) then deleted the source. The fix uses Move instead and patches onedrive to disallow a case folded identical copy (which errors with 500 error)
This commit is contained in:
@@ -600,6 +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)
|
||||
}
|
||||
|
||||
// Create temporary object
|
||||
dstObj, leaf, directoryID, err := f.createObject(remote, srcObj.modTime, srcObj.size)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user