file-browser: decode Ref.track#name abd Ref.directory#name
This commit is contained in:
parent
a8085cf29a
commit
ff14909fab
@ -61,6 +61,7 @@ class FilesLibraryProvider(backend.LibraryProvider):
|
|||||||
if not self._show_dotfiles and dir_entry.startswith(b'.'):
|
if not self._show_dotfiles and dir_entry.startswith(b'.'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
dir_entry = dir_entry.decode(sys.getfilesystemencoding(), 'replace')
|
||||||
if os.path.isdir(child_path):
|
if os.path.isdir(child_path):
|
||||||
result.append(models.Ref.directory(name=dir_entry, uri=uri))
|
result.append(models.Ref.directory(name=dir_entry, uri=uri))
|
||||||
elif os.path.isfile(child_path):
|
elif os.path.isfile(child_path):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user