From 8f5585d30c060d0258a4f4f1cd60630b7a657353 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 14 Apr 2020 01:31:04 +1000 Subject: [PATCH] Fix modified files not syncing correctly. - On quiting and restarting modified files were being recalculated over and over. --- eris/__main__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eris/__main__.py b/eris/__main__.py index c0070e4..5f66b06 100755 --- a/eris/__main__.py +++ b/eris/__main__.py @@ -329,9 +329,11 @@ class Summary: entry_index = self._entries.index(entry) except ValueError: return - for result in self._entries[entry_index]: + entry = self._entries[entry_index] + for result in entry: self.refresh_result(result, only_completed=False) self.closest_placeholder_generator = None + return entry @contextlib.contextmanager def keep_selection(self): @@ -373,7 +375,8 @@ class Summary: change_time = os.stat(full_path).st_ctime if change_time != cache[path]: cache[path] = change_time - self.on_file_modified(path) + entry = self.on_file_modified(path) + entry.change_time = change_time else: self.on_file_added(path) for path in cache.keys() - all_paths: