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
This commit is contained in:
parent
0906f8dd3b
commit
a86cedbc24
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue