Skip to content

Commit

Permalink
Windows/Extensions: Remove non-ascii characters (bug 1724)
Browse files Browse the repository at this point in the history
This works around a strange encoding bug on Windows. It only
affects users who have the rename_download extension enabled.
  • Loading branch information
thp committed Mar 27, 2013
1 parent 4b2c16b commit 17995b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion share/gpodder/extensions/rename_download.py
Expand Up @@ -39,7 +39,9 @@ def make_filename(self, current_filename, title):
basename, ext = os.path.splitext(filename)

new_basename = util.sanitize_encoding(title) + ext
new_basename = util.sanitize_filename(new_basename)
# On Windows, force ASCII encoding for filenames (bug 1724)
new_basename = util.sanitize_filename(new_basename,
use_ascii=gpodder.ui.win32)
new_filename = os.path.join(dirname, new_basename)

if new_filename == current_filename:
Expand Down

0 comments on commit 17995b2

Please sign in to comment.