Skip to content

Commit

Permalink
Fix filename sanitization with --no-windows-filenames
Browse files Browse the repository at this point in the history
Fix bug in 6fc85f6

Authored by: bashonly
  • Loading branch information
bashonly committed Jan 3, 2025
1 parent 0b6b774 commit c57db63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ def filename_sanitizer(key, value, restricted):
elif (sys.platform != 'win32' and not self.params.get('restrictfilenames')
and self.params.get('windowsfilenames') is False):
def sanitize(key, value):
return value.replace('/', '\u29F8').replace('\0', '')
return str(value).replace('/', '\u29F8').replace('\0', '')
else:
def sanitize(key, value):
return filename_sanitizer(key, value, restricted=self.params.get('restrictfilenames'))
Expand Down

0 comments on commit c57db63

Please sign in to comment.