Files
decypharr/internal/utils/file.go
Mukhtar Akere 9de7cfd73b - Improve propfind handler
- remove path escapes in fileinfo
- other minor fixes
2025-05-12 03:35:40 +01:00

22 lines
315 B
Go

package utils
import (
"net/url"
"strings"
)
func PathUnescape(path string) string {
// try to use url.PathUnescape
if unescaped, err := url.PathUnescape(path); err == nil {
return unescaped
}
// unescape %
unescapedPath := strings.ReplaceAll(path, "%25", "%")
// add others
return unescapedPath
}