From 8d9c483cd06fb561630c409d1a1766740424f0ab Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 4 Jun 2016 10:18:14 -0400 Subject: [PATCH] explorer: fix directory listing error handling --- artiq/gui/explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/gui/explorer.py b/artiq/gui/explorer.py index 760ad5a3d..bddbc5ebc 100644 --- a/artiq/gui/explorer.py +++ b/artiq/gui/explorer.py @@ -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