Client versions were turned into numbers in three different ways:
concatenated digits in options/utils ("2.5.12" -> 2512, so a future
"2.6.0" -> 260 would be considered older), digit concatenation with a
x10 fixup in the setup wizard, and zero-padded components in the main
window version check.
A single version_number() helper now zero-pads each component
(2.5.12 -> 20512) and is used by all of them, together with a shared
MIN_CLIENT_VERSION (2.5.11):
- The v2.5.12 options in profile settings are enabled based on a
correct comparison.
- The setup wizard enforces the same minimum version as the main
window (it accepted anything from v2.5.0).
- The "OneDrive client is out of date!" warning is only shown when the
installed client is older than the latest release, not when it is
newer (e.g. a v2.5.12 pre-release built from 'master').
With start_minimized enabled the main window is hidden, so a dialog
such as the resync prompt can be the only top-level window. Closing it
triggered Qt's default quit-on-last-window-closed, the application was
torn down while the worker QThread was still running, and Qt aborted
the process ("QThread: Destroyed while thread is still running"). The
onedrive client was left behind orphaned.
OneDriveGUI is a tray application, so it no longer quits when its last
window closes; quitting is explicit via the tray menu or the Quit
button. All workers are stopped from QApplication.aboutToQuit, so no
worker thread outlives the application, and the Quit action now ends
the event loop with QApplication.quit() instead of raising SystemExit
from a slot.
Fixes#297
For a local file system error the client prints a summary line without
any information of its own ("The local file system returned an error
with the following details:"), followed by the path and the actual
error. The status showed mostly the summary, e.g. "Error: The local
file system returned an error with the following details: Path:
./.steampath ...".
The status now shows the actual error ("Error: Local file system error:
./.steampath: No such file or directory"). When the item does not
exist, which is how a broken symbolic link is reported, the warning
tooltip suggests removing the link or enabling 'Skip symlinks'.
The tray icon ignores these errors as intended, matching the client's
current wording again ("...following details" instead of the old
"...following message").
Fixes#278
"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
Client v2.5.12 reports when WebSocket notifications for online changes
cannot be configured ("WARNING: Unable to configure WebSocket support
... The client will retry while monitor mode remains active"), when it
retries, and when WebSocket support is enabled again.
These are now written to the GUI log at warning/info level so they can
be found when diagnosing delayed online changes, but deliberately do
not change the status or warning icon: the client keeps picking up
online changes on the regular monitor interval and recovers by itself.
Refs #305
Client v2.5.12 validates the local system clock against Microsoft
service time. On unsafe drift it suspends timestamp-sensitive
synchronisation ("ERROR: OneDrive synchronisation suspended because
unsafe local system clock drift has been confirmed"), and on smaller
drift it warns ("WARNING: Local system clock drift detected").
- Suspension: the status reads "Sync suspended: the system clock is out
of sync" and the warning icon explains that sync resumes automatically
once the time is corrected, including the observed clock difference.
- Drift warning: the warning icon tooltip explains the problem without
replacing the current status.
- Recovery ("NOTICE: System clock validation has recovered", "...drift
has returned to the acceptable range", "...below the blocking
threshold") clears the warning and says that sync will resume.
Previously the suspension line was treated as a generic error that
waited for a continuation line, and the warnings were ignored.
Refs #305
Client v2.5.12 reports online deletions that could not be moved to the
configured local Recycle Bin, both as an error line ("ERROR: Move of
local file to the configured Recycle Bin failed for <path>: <reason>")
and in the end-of-cycle summary ("Failed local items to move to the
configured Recycle Bin: N" followed by one line per path).
These failures are now included in the failed-files count, status
tooltip and tray notification, and each affected path gets a
"Move to Recycle Bin failed" row in the file operation list with the
reason in its tooltip. Failed rows for deletions and Recycle Bin moves
are no longer rendered as completed "Deleted"/"Trashed" entries.
Refs #305
The client summarises failed uploads and failed downloads on separate
lines ("Failed items to upload to/from Microsoft OneDrive: N" and
"Failed items to download to/from ..."). Only the upload summary was
matched, and a second summary would have replaced the count instead of
adding to it, so the reported number of failed files was wrong when
downloads failed.
The tray notification is now raised once at the end of the sync cycle,
after all summaries are collected. Previously each summary could raise
its own notification, giving two notifications for one cycle.
Refs #305
The client reports a local deletion that is propagated online as
"Deleting online file from Microsoft OneDrive: ./path" (or "... online
folder ..."). This wording, used since v2.5.11, was not matched, so these
deletions never appeared in the file operation list; only the older
"Deleting item from Microsoft OneDrive" form was handled.
Also show folders deleted locally because they were removed online
("Deleting local directory") and folders moved to the local Recycle Bin
("Moving this local directory to the configured 'Recycle Bin'").
The follow-up "Successfully deleted item" line and the pathless
"Deleting online folder due to --local-first & --mirror-local-state"
line are not matched, so each deletion is listed once.
Refs #305
Client v2.5.12 publishes a machine-readable runtime status document,
monitor-status.json, in the configuration directory while running in
--monitor mode. OneDriveGUI now polls it every 2 seconds for each
running profile and uses it as the authoritative high-level state,
while the client output stays the source for per-file activity and
progress.
- The document is only used when its schema_version is 1 and its pid is
the client process started by the worker, so a stale file left behind
by a crashed or killed client is ignored.
- The status label is rewritten only when the high-level state changes
(idle with the local time of the last successful sync, partial
failure with the failure count, service unreachable, system clock
drift blocking sync, interrupted), so detailed messages from the
client output are not overwritten on every poll.
- The status label tooltip summarises the document: client state and
loop, last successful sync, cycle count and result, failure counts,
OneDrive reachability and system time state.
- The tray icon uses the document's state (syncing, idle, degraded)
instead of guessing from the status text.
UTC timestamps are converted to local time by hand, as the client emits
7 fractional digits which datetime.fromisoformat() rejects before
Python 3.11 (the AppImage ships Python 3.10).
Clients older than v2.5.12, or profiles with monitor_status disabled,
keep using the status derived from the client output.
Refs #305
Client v2.5.12 exits with code 78 (previously 126) when a --resync is
required. The worker now checks the exit code after the client stops and
asks for resync authorization if the output matcher did not already
fire, so a future change in the message wording does not leave the
profile silently stopped.
The resync dialog is also requested only once per run: v2.5.12 can
print two matching lines for one event (e.g. the cache-state message
followed by "A --resync is required to rebuild the local item
database."), which would otherwise open the dialog twice.
Refs #305
New options introduced in OneDrive client v2.5.12:
- disable_time_check (Sync Options > Advanced options): skip validating
the system clock against Microsoft service time. The tooltip carries
the upstream caution that this bypasses a correctness safeguard.
- monitor_status (Sync Options > Advanced options): publish the
machine-readable monitor-status.json runtime status file.
- notify_monitor_start (Logging > Notifications): desktop notification
when monitor mode becomes active; disabled while notifications are
disabled.
Defaults are added to the bundled default config, so the options are
only written to the client config when changed. Older clients refuse to
start with unknown keys, so the checkboxes are disabled when the
installed client is older than v2.5.12.
Refs #305
The client no longer supports 'sync_business_shared_folders',
'min_notify_changes' and 'force_http_2'. The latter two are ignored
with a warning on every start, but 'sync_business_shared_folders' is a
configuration error that stops the client from starting at all.
These options are now dropped when profiles are loaded, so the config
saved on startup no longer contains them. 'min_notify_changes' is
removed from the bundled default config, which made it look like a
supported option.
The status message shown when the client reports the option no longer
claims that Business Shared Folders were deprecated (the wiki it linked
says otherwise). It now says that the config option is unsupported and
how to remove it. None of these options affect the client's
resync-required checks.
Fixes#287
Refs #305
The client prints the same file both with and without a leading './'
depending on the message (e.g. the transfer line vs. the failed-items
summary). The two spellings were treated as different files, which
created duplicate rows and left a stale hidden "failed" row (and a
wrong failed count) behind after the file synced successfully.
Paths are now normalised before they are used as row keys in the file
operation list and as keys for the per-file error messages in the
worker.
Failed file transfers are pinned at the top of the file operation list
but hidden by default; a "N failed" button in the account header shows
or hides them, so a large number of persistent failures no longer
floods the list and pushes synced files out of view.
Rows that are still open (in progress or failed, no completion
timestamp) are tracked in a per-profile map keyed by full path, so a
file that keeps failing across sync cycles updates its row in place
instead of adding a duplicate on every cycle, regardless of how far
down the list the row has moved. Stalled transfers are moved to the top
as one batch.
The tray tooltip now lists free space per profile, including the last
known value restored from config while sync is stopped, so the GUI
window does not need to be opened to check it.
Tray tooltips are rendered by the desktop environment at a fixed narrow
width that the application cannot widen, and profile names (often email
addresses) use most of it. The tooltip was restructured so each value
gets its own short line indented under the profile name, with profiles
separated by blank lines - lines no longer wrap mid-value and
multi-profile listings stay readable.
Also removed leftover src/ui/ from the pre-packaging layout (empty file
from a mistargeted uic run and stale __pycache__).
Closes#309
- client and GUI version lookups retry every 60 seconds, up to 10 attempts, before reporting failure
- raise the GitHub request timeout from 1 to 3 seconds
- Fix autostart Exec fallback: the package now uses relative imports, so
a desktop entry pointing at the script path fails at login. Use
"-m onedrive_gui" with PYTHONPATH instead, and recognise the pip
console script "onedrive-gui" when it is on PATH.
- AppImageBuilder.yml: revert accidental python3.10 -> python3.12 change,
drop the now-redundant "cp src AppDir/usr" (the wheel install covers
it), quote the *.whl glob.
- pyproject.toml: read version dynamically from options.py so it is not
duplicated in a third place; declare runtime dependencies; remove the
pyproject sed step from build_appimage.sh.
- MANIFEST.in: ship the resources/ directory only; stop packaging .ui
sources and remove the stray mainwindow.ui.autosave.
- Ignore build/, dist/ and *.egg-info; update README wheel filename.
- rebuild the wizard's profile dropdown from live config on every page entry instead of a one-time snapshot at app startup
- persist account type to the profiles file when the client reports it; previously it only lived in memory and was lost on restart
- resolve installed executable to its absolute path instead of writing a bare command name
- fall back to the current interpreter plus the main script path when running from source, where no executable exists on PATH
- return the binary path for frozen builds
- quote Exec paths so install locations with spaces work
- left click on tray icon now focuses and raises the main window when it is visible but unfocused, instead of hiding it
- hiding still happens when the window is focused, showing when hidden
Three small fixes to one function:
- Remove unused `sender = self.sender()` local (assigned but never used)
- Remove leftover `print("test " + _property)` debug line
- Narrow bare `except:` to `except AttributeError:` — matches the
exception `re.search(...).group(1)` actually raises when there is no
match, and stops swallowing unrelated errors (KeyboardInterrupt etc.)
No behavior change for normal control flow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`QTimer` appeared twice in the same `from PySide6.QtCore import ...` line,
a likely artifact of the monolithic-to-modular extraction. Python silently
deduplicates so there is no behavior change, but pyflakes flagged it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>