From 6983f3520aa1615a0e1d803c883ab47c62b0cc74 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/dashboard/explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/dashboard/explorer.py b/artiq/dashboard/explorer.py index f22722946..e32c948e3 100644 --- a/artiq/dashboard/explorer.py +++ b/artiq/dashboard/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