loopback: Utimens: deduplicate and fix time conversion code
1) Fix the "a" instead of "m" typo in loopbackFile.Utimens. Besides the incorrect behavoir, this causes a crash if "a" is nil. Obsoletes https://github.com/hanwen/go-fuse/pull/100 . 2) Enable nanosecond resolution for dates after 1970. syscall.NsecToTimespec is broken for dates before 1970 but works fine otherwise, so let's keep the nanoseconds there. 3) Deduplicate the time conversion code in nodefs and paths into the new function fuse.UtimeToTimespec. 4) Add a test case.
Showing
Please register or sign in to comment