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

vfs: fix incorrect modtime on fs which don't support setting modtime

Nick Craig-Wood143285e2b727
diff --git a/vfs/file.go b/vfs/file.go
index aa2493a5f..5e5c74f97 100644
--- a/vfs/file.go
+++ b/vfs/file.go
@@ -296,6 +296,9 @@ func (f *File) activeWriters() int {
// It should be called with the lock held
func (f *File) _roundModTime(modTime time.Time) time.Time {
precision := f.d.f.Precision()
+ if precision == fs.ModTimeNotSupported {
+ return modTime
+ }
return modTime.Truncate(precision)
}