682e642cfa
For Linux, everything effectively stays the same. For both path-based and fd-based Utimens() calls, we use unix.UtimesNanoAt(). To avoid introducing a separate syscall wrapper for futimens() (as done in go-fuse, for example), we instead use the /proc/self/fd - trick. On macOS, this changes quite a lot: * Path-based Utimens() calls were previously completely broken, since unix.UtimensNanoAt() ignores the passed file descriptor. Note that this cannot be fixed easily since there IS no appropriate syscall available on macOS prior to High Sierra (10.13). We emulate this case by using Fchdir() + setattrlist(). * Fd-based Utimens() calls were previously translated to f.GetAttr() (to fill any empty parameters) and syscall.Futimes(), which does not does support nanosecond precision. Both issues can be fixed by switching to fsetattrlist(). Fixes https://github.com/rfjakob/gocryptfs/issues/350 |
||
---|---|---|
.. | ||
emulate_test.go | ||
emulate.go | ||
getdents_linux.go | ||
getdents_other.go | ||
getdents_test.go | ||
helpers.go | ||
main_test.go | ||
open_nofollow_test.go | ||
open_nofollow.go | ||
sys_common_test.go | ||
sys_common.go | ||
sys_darwin.go | ||
sys_linux.go | ||
unix2syscall_darwin.go | ||
unix2syscall_linux.go |