aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/fs.go')
-rw-r--r--internal/fusefrontend/fs.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index 5367622..1219479 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -230,15 +230,18 @@ func (fs *FS) Truncate(path string, offset uint64, context *fuse.Context) (code
return code
}
-func (fs *FS) Utimens(path string, Atime *time.Time, Mtime *time.Time, context *fuse.Context) (code fuse.Status) {
+func (fs *FS) Utimens(path string, a *time.Time, m *time.Time, context *fuse.Context) (code fuse.Status) {
if fs.isFiltered(path) {
return fuse.EPERM
}
- cPath, err := fs.encryptPath(path)
+ cPath, err := fs.getBackingPath(path)
if err != nil {
return fuse.ToStatus(err)
}
- return fs.FileSystem.Utimens(cPath, Atime, Mtime, context)
+ ts := make([]syscall.Timespec, 2)
+ ts[0] = utimeToTimespec(a)
+ ts[1] = utimeToTimespec(m)
+ return fuse.ToStatus(syscall.UtimesNano(cPath, ts))
}
func (fs *FS) StatFs(path string) *fuse.StatfsOut {