1
0
mirror of https://github.com/bpozdena/OneDriveGUI.git synced 2026-10-24 04:59:17 +03:00

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
This commit is contained in:
Boris Pozdena
2026-10-18 10:25:51 +02:00
parent e4d8b279f7
commit 2941efd4e5

View File

@@ -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)