Remove incorrect and unused timespec check

Compare is using its own time check comparison and
doing byte comparison when ambiguous rather than
ignoring it like this function does.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2017-02-01 14:30:12 -08:00
parent f78105d832
commit bf8f37ba78
1 changed files with 1 additions and 9 deletions

View File

@ -1,9 +1,6 @@
package fs
import (
"syscall"
"time"
)
import "time"
// Gnu tar and the go tar writer don't have sub-second mtime
// precision, which is problematic when we apply changes via tar
@ -14,8 +11,3 @@ func sameFsTime(a, b time.Time) bool {
(a.Unix() == b.Unix() &&
(a.Nanosecond() == 0 || b.Nanosecond() == 0))
}
func sameFsTimeSpec(a, b syscall.Timespec) bool {
return a.Sec == b.Sec &&
(a.Nsec == b.Nsec || a.Nsec == 0 || b.Nsec == 0)
}