From 7eb75015a010cdd376626a378d11e53f88c0efd9 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 8 Jul 2022 10:00:54 +0200 Subject: [PATCH] Fix first dot in name --- tools/path.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/path.go b/tools/path.go index 016acae..560704b 100644 --- a/tools/path.go +++ b/tools/path.go @@ -18,5 +18,8 @@ func GetRelPath(path string) string { func PathToName(path string) string { path = strings.TrimPrefix(GetRelPath(path), "./") path = regexp.MustCompile(replaceChars).ReplaceAllString(path, "-") + if path[0] == '-' { + path = path[1:] + } return path }