file-browser: decode Ref.track#name abd Ref.directory#name

This commit is contained in:
rawdlite 2015-07-08 00:25:48 +02:00
parent a8085cf29a
commit ff14909fab

View File

@ -61,6 +61,7 @@ class FilesLibraryProvider(backend.LibraryProvider):
if not self._show_dotfiles and dir_entry.startswith(b'.'):
continue
dir_entry = dir_entry.decode(sys.getfilesystemencoding(), 'replace')
if os.path.isdir(child_path):
result.append(models.Ref.directory(name=dir_entry, uri=uri))
elif os.path.isfile(child_path):