From be82706413195d39a3043b83b9c6ab1265f2b394 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 25 Apr 2018 14:04:31 +0200 Subject: [PATCH] [bugfix] event_path overwritten --- PyLoT.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PyLoT.py b/PyLoT.py index 80e2b15a..de4c879f 100755 --- a/PyLoT.py +++ b/PyLoT.py @@ -1324,10 +1324,14 @@ class MainWindow(QMainWindow): # self.data.processed is only None for PyLoT datastructure, else True or False wf_dir = wf_stat[self.data.processed] if wf_dir is not None: - event_path = os.path.join(event_path, wf_dir) - if wf_dir is 'processed' and not os.path.exists(event_path): - event_path = os.path.join(event_path, 'raw') - return not bool(os.listdir(event_path)) + wf_path = os.path.join(event_path, wf_dir) + if wf_dir is 'processed' and not os.path.exists(wf_path): + wf_path = os.path.join(event_path, 'raw') + else: + wf_path = event_path + if not os.path.exists(wf_path): + return True + return not bool(os.listdir(wf_path)) def filename_from_action(self, action): if action.data() is None: