Fix #2466: GIO returns bytes, so decode them

This commit is contained in:
Adrian Sampson 2017-03-03 11:59:50 -06:00
parent a8c46d8b32
commit d356356111
2 changed files with 9 additions and 1 deletions

View file

@ -289,4 +289,10 @@ class GioURI(URIGetter):
raise
finally:
self.libgio.g_free(uri_ptr)
return uri
try:
return uri.decode(util._fsencoding())
except UnicodeDecodeError:
raise RuntimeError(
"Could not decode filename from GIO: {!r}".format(uri)
)

View file

@ -59,6 +59,8 @@ Fixes:
``copy`` and ``move`` options. :bug:`2444`
* :doc:`/plugins/mbsubmit`: The tracks are now sorted. Thanks to
:user:`awesomer`. :bug:`2457`
* :doc:`/plugins/thumbnails`: Fix a string-related crash on Python 3.
:bug:`2466`
1.4.3 (January 9, 2017)