mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Fix Windows encoding in convert stub (#2516)
This commit is contained in:
parent
e709ae6dd5
commit
fb7296711c
1 changed files with 3 additions and 6 deletions
|
|
@ -28,12 +28,9 @@ def convert(in_file, out_file, tag):
|
|||
if not isinstance(tag, bytes):
|
||||
tag = tag.encode('utf-8')
|
||||
|
||||
# On Windows, use Unicode paths. (The test harness gives them to us
|
||||
# as UTF-8 bytes.)
|
||||
if platform.system() == 'Windows':
|
||||
if not PY2:
|
||||
in_file = in_file.encode(arg_encoding())
|
||||
out_file = out_file.encode(arg_encoding())
|
||||
# On Windows, use Unicode paths. On Python 3, we get the actual,
|
||||
# Unicode filenames. On Python 2, we get them as UTF-8 byes.
|
||||
if platform.system() == 'Windows' and PY2:
|
||||
in_file = in_file.decode('utf-8')
|
||||
out_file = out_file.decode('utf-8')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue