mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 16:25:38 +00:00
keywords: time can be 0
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
be2b0574a6
commit
ac37b23f38
1 changed files with 3 additions and 0 deletions
|
@ -208,6 +208,9 @@ var (
|
||||||
}
|
}
|
||||||
timeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
timeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
||||||
t := info.ModTime().UnixNano()
|
t := info.ModTime().UnixNano()
|
||||||
|
if t == 0 {
|
||||||
|
return "time=0.0", nil
|
||||||
|
}
|
||||||
return fmt.Sprintf("time=%d.%d", (t / 1e9), (t % (t / 1e9))), nil
|
return fmt.Sprintf("time=%d.%d", (t / 1e9), (t % (t / 1e9))), nil
|
||||||
}
|
}
|
||||||
linkKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
linkKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
||||||
|
|
Loading…
Reference in a new issue