Typo fixed

This commit is contained in:
David Rotermund 2025-02-09 01:05:33 +01:00
parent 25bd68b747
commit bd281bc953

View file

@ -194,7 +194,7 @@ var fileNameSanitizeRegexp = regexp.MustCompile(`(?i)\.\.|[<>:\"\\|?*\x{0000}-\x
// Based on https://github.com/sindresorhus/filename-reserved-regex
// Adds ".." to prevent directory traversal
func fileNameSanitize(s string) string {
+ // Added this because I am not sure what Windows will deliver us \ or / but we need /.
// Added this because I am not sure what Windows will deliver us \ or / but we need /.
s = strings.ReplaceAll(s, "\\", "/")
return strings.TrimSpace(fileNameSanitizeRegexp.ReplaceAllString(s, "_"))
}