From def7b77d0f8ddf4d4f5c4502c55a5e18ed9367db Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 30 Sep 2020 16:06:57 +0100 Subject: [PATCH] vfs: Fix --no-modtime to not attempt to set modtimes (as documented) See: https://forum.rclone.org/t/rclone-mount-with-azure-blob-archive-tier/19414 --- vfs/file.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vfs/file.go b/vfs/file.go index eb1103cd3..c3e58311c 100644 --- a/vfs/file.go +++ b/vfs/file.go @@ -342,9 +342,14 @@ func (f *File) Size() int64 { } // SetModTime sets the modtime for the file +// +// if NoModTime is set then it does nothing func (f *File) SetModTime(modTime time.Time) error { f.mu.Lock() defer f.mu.Unlock() + if f.d.vfs.Opt.NoModTime { + return nil + } if f.d.vfs.Opt.ReadOnly { return EROFS }