Typo fixed
This commit is contained in:
parent
25bd68b747
commit
bd281bc953
1 changed files with 1 additions and 1 deletions
|
@ -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, "_"))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue