2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

explorer: fix directory listing error handling

This commit is contained in:
Sebastien Bourdeauducq 2016-06-04 10:18:14 -04:00
parent 284e0d6876
commit 6983f3520a

View File

@ -61,7 +61,7 @@ class _OpenFileDialog(QtWidgets.QDialog):
except:
logger.error("Failed to list directory '%s'",
self.explorer.current_directory, exc_info=True)
self.explorer.current_directory = ""
return
for name in sorted(contents, key=lambda x: (x[-1] not in "\\/", x)):
if name[-1] in "\\/":
icon = QtWidgets.QStyle.SP_DirIcon