From bf8f37ba7847ae6be3348757df820effe1ae09db Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 1 Feb 2017 14:30:12 -0800 Subject: [PATCH] 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 (github: dmcgowan) --- fs/time.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fs/time.go b/fs/time.go index 92966a352..c336f4d88 100644 --- a/fs/time.go +++ b/fs/time.go @@ -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) -}