mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 09:52:05 +02:00
sync: when using --backup-dir don't delete files if we can't set their modtime
This is a problem when syncing a file which just needed its modtime set with dropbox which can't set the mod time of a file without re-uploading it. Before this change we would delete the file, then the server side move would fail moving the file to the backup-dir because it no longer existed. After this change the destination file is moved to the backup-dir instead of being deleted and the new file is uploaded. Fixes #2134
This commit is contained in:
@@ -801,7 +801,7 @@ func (o *Object) SetModTime(modTime time.Time) error {
|
||||
// Dropbox doesn't have a way of doing this so returning this
|
||||
// error will cause the file to be deleted first then
|
||||
// re-uploaded to set the time.
|
||||
return fs.ErrorCantSetModTimeWithoutDelete
|
||||
return fs.ErrorCantSetModTime
|
||||
}
|
||||
|
||||
// Storable returns whether this object is storable
|
||||
|
Reference in New Issue
Block a user