Drag and Drop UI: fix lint
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled

This commit is contained in:
David Rotermund 2025-04-05 19:27:33 +02:00
parent 8073343f1d
commit 02e72205ad
2 changed files with 35 additions and 37 deletions

View file

@ -22,7 +22,7 @@ func SanitizePath(inputPath string) (string, error) {
for _, component := range pathComponents {
// Trim whitespace and apply regex sanitization
sanitizedComponent := strings.TrimSpace(fileNameComponentSanitizeRegexp.ReplaceAllString(component, "_"))
// Skip empty components after sanitization
if sanitizedComponent != "" {
sanitizedComponents = append(sanitizedComponents, sanitizedComponent)
@ -36,4 +36,3 @@ func SanitizePath(inputPath string) (string, error) {
reconstructedPath := path.Join(sanitizedComponents...)
return reconstructedPath, nil
}