From 2941efd4e58f0b93ae63548cdd6dec6945918456 Mon Sep 17 00:00:00 2001 From: Boris Pozdena Date: Sun, 18 Oct 2026 10:25:51 +0200 Subject: [PATCH] Remove output matcher for a message the client never prints "Initializing the OneDrive API" does not exist in client v2.5.11 or v2.5.12, so the branch matching it never ran, including the per-cycle reset of the per-file error messages it contained. That reset now happens when a sync cycle starts, so error messages of files that failed in earlier cycles no longer accumulate for the lifetime of the client process. The tray notification de-duplication is intentionally not reset per cycle, so persistent failures are not re-notified on every cycle. Refs #305 --- src/onedrive_gui/workers.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/onedrive_gui/workers.py b/src/onedrive_gui/workers.py index 1063456..971899d 100644 --- a/src/onedrive_gui/workers.py +++ b/src/onedrive_gui/workers.py @@ -418,19 +418,6 @@ class WorkerThread(QThread): temp_global_config[self.profile_name]["account_type"] = self.account_type.capitalize() # save_global_config() - elif "Initializing the OneDrive API" in stdout: - # Clear failed files list at start of new sync cycle - self.failed_files = [] - self.failed_files_count = 0 - self.collecting_failed_files = False - self.file_errors = {} - self.last_unattributed_error = None - self._last_notified_failures = None - self.msg = "Initializing the OneDrive API" - logging.info(f"[{self.profile_name}] {self.msg}") - self.profile_status["status_message"] = self.msg - self.update_profile_status.emit(self.profile_status, self.profile_name) - elif "Starting a sync with Microsoft OneDrive" in stdout: # A new sync cycle starts. Reset the failed-files list of the # previous cycle, but keep its warning (if any) visible until @@ -440,6 +427,9 @@ class WorkerThread(QThread): self.failed_files = [] self.failed_files_count = 0 self.collecting_failed_files = False + # Per-file error messages only explain failures of the current cycle. + self.file_errors = {} + self.last_unattributed_error = None if not previous_cycle_had_failures: self.profile_status.pop("error_message", None) self.clear_warning.emit(self.profile_name)