Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

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

Stefan2a806a8d8b22
diff --git a/vfs/file.go b/vfs/file.go
index fd2a6970a..fa2c7ac95 100644
--- a/vfs/file.go
+++ b/vfs/file.go
@@ -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.