From 02c4e22085990bec1c05e2d9b9f33678af5304db Mon Sep 17 00:00:00 2001 From: monomonedula Date: Sat, 16 Sep 2023 22:57:45 +0300 Subject: [PATCH] Trim puzzle paths of the leading slash --- pkg/gopdd/collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gopdd/collector.go b/pkg/gopdd/collector.go index 57ec321..8feccc5 100644 --- a/pkg/gopdd/collector.go +++ b/pkg/gopdd/collector.go @@ -28,7 +28,7 @@ type Source struct { } func (s Source) PathFromRoot() string { - return strings.Replace(s.file, s.root, "", 1) + return strings.TrimPrefix(strings.Replace(s.file, s.root, "", 1), "/") } func splitLines(s string) []string {