1
mirror of https://github.com/rclone/rclone synced 2024-12-23 14:23:44 +01:00

mount: only print "File.rename error" if there actually is an error - see #2130 (#2322)

This commit is contained in:
Stefan 2018-05-29 19:19:17 +02:00 committed by GitHub
parent 500085d244
commit 2a806a8d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,8 +99,9 @@ func (f *File) applyPendingRename() {
return
}
fs.Debugf(f.o, "Running delayed rename now")
err := fun()
fs.Errorf(f.Path(), "File.Rename error: %v", err)
if err := fun(); err != nil {
fs.Errorf(f.Path(), "delayed File.Rename error: %v", err)
}
}
// rename attempts to immediately rename a file if there are no open writers.