Skip to content

Commit

Permalink
Merge pull request #715 from tcely/patch-4
Browse files Browse the repository at this point in the history
Use a raw string
  • Loading branch information
meeb authored Feb 12, 2025
2 parents 5b88a31 + 69095f9 commit 78434ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tubesync/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def append_uri_params(uri, params):
def clean_filename(filename):
if not isinstance(filename, str):
raise ValueError(f'filename must be a str, got {type(filename)}')
to_scrub = '<>\/:*?"|%'
for char in to_scrub:
to_scrub = r'<>\/:*?"|%'
for char in list(to_scrub):
filename = filename.replace(char, '')
clean_filename = ''
for c in filename:
Expand Down

0 comments on commit 78434ca

Please sign in to comment.