1
0
Fork 0
mirror of synced 2024-06-27 18:40:34 +12:00

Bugfix: control characters aren't allowed in windows filenames

This commit is contained in:
Thomas 2023-02-12 17:15:45 +01:00
parent 0051877e01
commit aaf51b0eff
No known key found for this signature in database
GPG key ID: 0CFD61744DA1A21C

View file

@ -221,6 +221,7 @@ class FileNameFormatter:
for char in invalid_characters:
input_string = input_string.replace(char, "")
input_string = FileNameFormatter._strip_emojis(input_string)
input_string = "".join(ch for ch in input_string if ord(ch) > 31 and ord(ch) != 127)
return input_string
@staticmethod