Fix crash with VLC on windows with unicode chars in filename. Fixes bug 1491998.

Fixes: https://launchpad.net/bugs/1491998
This commit is contained in:
Tomas Groth 2015-09-03 20:11:08 +01:00
parent 0b4cf91c42
commit 964af5fc92

View File

@ -60,7 +60,7 @@ if sys.version_info[0] > 2:
"""Translate string or bytes to bytes.
"""
if isinstance(s, str):
return bytes(s, sys.getfilesystemencoding())
return s.encode()
else:
return s