kopia lustrzana https://github.com/Michael-K-Stein/SpotiFile
Fix illegal file path cleaning
rodzic
e8bbed1b35
commit
a1ca12c375
|
@ -1,4 +1,7 @@
|
|||
ILLEGAL_FILE_NAME_CHARACTERS = '/?"*|\\:;><#%{}$!\'@`='
|
||||
|
||||
|
||||
def clean_file_path(prompt: str):
|
||||
return prompt.replace('/', '').replace('?', '').replace('"', '').replace('*', '').replace('|', '').replace('\\', '').replace(':', '').replace(';', '').replace('>', '').replace('<', '')
|
||||
for illegal_char in ILLEGAL_FILE_NAME_CHARACTERS:
|
||||
prompt = prompt.replace(illegal_char, '')
|
||||
return prompt
|
||||
|
|
Ładowanie…
Reference in New Issue