1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-11-16 13:28:37 +00:00

keywords: time can be 0

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-06-27 13:16:24 -04:00
parent be2b0574a6
commit ac37b23f38

View file

@ -208,6 +208,9 @@ var (
}
timeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
t := info.ModTime().UnixNano()
if t == 0 {
return "time=0.0", nil
}
return fmt.Sprintf("time=%d.%d", (t / 1e9), (t % (t / 1e9))), nil
}
linkKeywordFunc = func(path string, info os.FileInfo) (string, error) {