From ae084a8443f224fcd053c9fd866a52be0035371e Mon Sep 17 00:00:00 2001 From: Maxime GRANDCOLAS Date: Fri, 17 Jan 2020 12:02:12 +0100 Subject: [PATCH] [GUI] Clear display files on stat error --- newsfragments/920.bugfix.rst | 1 + parsec/core/gui/files_widget.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 newsfragments/920.bugfix.rst diff --git a/newsfragments/920.bugfix.rst b/newsfragments/920.bugfix.rst new file mode 100644 index 00000000000..dd5b5d5d641 --- /dev/null +++ b/newsfragments/920.bugfix.rst @@ -0,0 +1 @@ +Clear displayed files on stat error diff --git a/parsec/core/gui/files_widget.py b/parsec/core/gui/files_widget.py index 8ea65315356..5a53527db62 100644 --- a/parsec/core/gui/files_widget.py +++ b/parsec/core/gui/files_widget.py @@ -688,7 +688,11 @@ def _on_folder_stat_success(self, job): self.filter_files(self.line_edit_search.text()) def _on_folder_stat_error(self, job): - pass + self.table_files.clear() + if self.current_directory == FsPath("/"): + self.table_files.add_parent_workspace() + else: + self.table_files.add_parent_folder() def _on_folder_create_success(self, job): pass