Fix Linux Download Path (#153)

* Fix Unknown being appended at the beginning of Download Path on Unix/Linux systems

* Remove extra blank line in backend/filename.go
This commit is contained in:
Heggo
2025-12-12 11:27:09 +01:00
committed by GitHub
parent 8f10094e40
commit 64b86b65a1
+6
View File
@@ -80,6 +80,12 @@ func SanitizeFolderPath(folderPath string) string {
continue continue
} }
// Keep empty string at the start for absolute paths on Unix
if i == 0 && part == "" {
sanitizedParts = append(sanitizedParts, part)
continue
}
// Sanitize each folder name (but don't replace / or \ since we already normalized) // Sanitize each folder name (but don't replace / or \ since we already normalized)
sanitized := sanitizeFolderName(part) sanitized := sanitizeFolderName(part)
if sanitized != "" { if sanitized != "" {