mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-24 11:00:02 +02:00
Drag and Drop UI: fix lint
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
This commit is contained in:
parent
8073343f1d
commit
02e72205ad
2 changed files with 35 additions and 37 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue