From fca1b824172fee453667ce9951df7c35a9f7e6e0 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 25 Sep 2016 16:30:29 +0200 Subject: fusefrontend: relay Utimens to go-fuse Commit af5441dcd9033e81da43ab77887a7b5aac693ab6 has caused a regression ( https://github.com/rfjakob/gocryptfs/issues/35 ) that is fixed by this commit. The go-fuse library by now has all the syscall wrappers in place to correctly handle Utimens, also for symlinks. Instead of duplicating the effort here just call into go-fuse. Closes #35 --- internal/fusefrontend/fs.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'internal/fusefrontend/fs.go') diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index 1219479..bc81c37 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -234,14 +234,11 @@ func (fs *FS) Utimens(path string, a *time.Time, m *time.Time, context *fuse.Con if fs.isFiltered(path) { return fuse.EPERM } - cPath, err := fs.getBackingPath(path) + cPath, err := fs.encryptPath(path) if err != nil { return fuse.ToStatus(err) } - ts := make([]syscall.Timespec, 2) - ts[0] = utimeToTimespec(a) - ts[1] = utimeToTimespec(m) - return fuse.ToStatus(syscall.UtimesNano(cPath, ts)) + return fs.FileSystem.Utimens(cPath, a, m, context) } func (fs *FS) StatFs(path string) *fuse.StatfsOut { -- cgit v1.2.3