mirror of
https://github.com/rclone/rclone.git
synced 2025-01-09 15:58:28 +01:00
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
51b18a4a26
commit
def7b77d0f
@ -342,9 +342,14 @@ func (f *File) Size() int64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetModTime sets the modtime for the file
|
// SetModTime sets the modtime for the file
|
||||||
|
//
|
||||||
|
// if NoModTime is set then it does nothing
|
||||||
func (f *File) SetModTime(modTime time.Time) error {
|
func (f *File) SetModTime(modTime time.Time) error {
|
||||||
f.mu.Lock()
|
f.mu.Lock()
|
||||||
defer f.mu.Unlock()
|
defer f.mu.Unlock()
|
||||||
|
if f.d.vfs.Opt.NoModTime {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if f.d.vfs.Opt.ReadOnly {
|
if f.d.vfs.Opt.ReadOnly {
|
||||||
return EROFS
|
return EROFS
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user