diff --git a/pkg/io/files/file_name_utils.go b/pkg/io/files/file_name_utils.go index 03f22f6..5daf2c8 100644 --- a/pkg/io/files/file_name_utils.go +++ b/pkg/io/files/file_name_utils.go @@ -61,6 +61,17 @@ func ReplaceAllRestrictedCharacters(filePath string) string { return filePath } +func ReplaceAllRestrictedCharactersNoSlashes(filePath string) string { + for k, v := range RestrictedFilepathCharactersReplacements { + if k == "\\" || k == "/" { + continue + } + filePath = strings.ReplaceAll(filePath, k, v) + } + + return filePath +} + func TryAbs(filePath string) string { if !filepath.IsAbs(filePath) { abs, err := filepath.Abs(filePath)