From b8a0cc509cd66755f6b67b6c12c0c4b42e80b6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Fri, 11 May 2018 12:46:19 +0200 Subject: [PATCH] Remove unallowed : char in results dir --- utils/paths.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/paths.go b/utils/paths.go index 42cf979..2699f88 100644 --- a/utils/paths.go +++ b/utils/paths.go @@ -28,10 +28,12 @@ func DBDir(home string, name string) string { return filepath.Join(home, "db", fmt.Sprintf("%s.sqlite3", name)) } +const resultdirFormat = "2006-01-02T150405.999999999Z0700" + // MakeResultsDir creates and returns a directory for the result func MakeResultsDir(home string, name string, ts time.Time) (string, error) { p := filepath.Join(home, "msmts", - fmt.Sprintf("%s-%s", name, ts.Format(time.RFC3339Nano))) + fmt.Sprintf("%s-%s", name, ts.Format(resultdirFormat))) // If the path already exists, this is a problem. It should not clash, because // we are using nanosecond precision for the starttime.