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 {