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:
@@ -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 != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user