From ac37b23f38bfa3f1d6f8af06b0a71a58fcdc031a Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 27 Jun 2016 13:16:24 -0400 Subject: [PATCH] keywords: time can be 0 Signed-off-by: Vincent Batts --- keywords.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keywords.go b/keywords.go index bffe169..dcf368f 100644 --- a/keywords.go +++ b/keywords.go @@ -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) {