mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-12-22 13:56:30 +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) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue