mirror of https://github.com/m-labs/artiq.git
explorer: fix directory listing error handling
This commit is contained in:
parent
284e0d6876
commit
6983f3520a
|
@ -61,7 +61,7 @@ class _OpenFileDialog(QtWidgets.QDialog):
|
||||||
except:
|
except:
|
||||||
logger.error("Failed to list directory '%s'",
|
logger.error("Failed to list directory '%s'",
|
||||||
self.explorer.current_directory, exc_info=True)
|
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)):
|
for name in sorted(contents, key=lambda x: (x[-1] not in "\\/", x)):
|
||||||
if name[-1] in "\\/":
|
if name[-1] in "\\/":
|
||||||
icon = QtWidgets.QStyle.SP_DirIcon
|
icon = QtWidgets.QStyle.SP_DirIcon
|
||||||
|
|
Loading…
Reference in New Issue