diff --git a/file.go b/file.go index 7cdde53..a3d502e 100644 --- a/file.go +++ b/file.go @@ -63,14 +63,14 @@ func copyFile(src, dst string) (error) { func replaceDelimiters(input string) string { replacer := strings.NewReplacer( - "/", "/", - "\\", "\", + "/", "⧸", + "\\", "⧵", ) return replacer.Replace(input) } func sanitizeFilename(filename string) string { - invalidFilenameChars := regexp.MustCompile(`[^a-zA-Z0-9._-/\[[:blank:]]]+`) + invalidFilenameChars := regexp.MustCompile(`[^a-zA-Z0-9._-⧸⧵[[:blank:]]]+`) sanitized := invalidFilenameChars.ReplaceAllString(filename, "-")