diff --git a/pkg/ui/ui.go b/pkg/ui/ui.go index 08619d7804..49641ce945 100644 --- a/pkg/ui/ui.go +++ b/pkg/ui/ui.go @@ -189,10 +189,7 @@ func SanitizePrefix(prefix string) (string, error) { // Remove double slashes, convert to absolute path. sanitizedPrefix := strings.TrimPrefix(path.Clean(u.Path), ".") - - if strings.HasSuffix(sanitizedPrefix, "/") { - sanitizedPrefix = strings.TrimSuffix(sanitizedPrefix, "/") - } + sanitizedPrefix = strings.TrimSuffix(sanitizedPrefix, "/") return sanitizedPrefix, nil }