Commit graph

1,655 commits

Author SHA1 Message Date
abraunegg
71cddf36bb
Fix Bug #3567: Ensure mkdirRecurse() is correctly wrapped in try block (#3566)
* Based on an application crash output from OMV, if the client is unable to create the required path, the application crashes. Harden all calls to mkdirRecurse() by wrapping in a try block.
2025-12-13 10:29:38 +11:00
abraunegg
0b65d073eb
Update Dockerfiles December 2025 (#3565)
* Update Dockerfiles December 2025:
  - Update to Fedora 43 and GO 1.23
  - Update to Alpine 3.23 and GO 1.25
  - Update to Debian 13 and support relevant time64 package changes
2025-12-12 15:18:05 +11:00
abraunegg
19b050fa79
Improve --resync warning prompt for clarity and safer operation (#3562)
This update refines the --resync user warning prompt to provide clearer,
more accurate guidance on the behaviour and risks associated with performing a
resynchronisation operation.

Key improvements include:

Explicitly explaining that --resync deletes the client’s local state
database and rebuilds it entirely from the current OneDrive contents.

Accurately describing possible outcomes, including overwrite scenarios,
conflict-driven renames or duplications, increased upload/download activity,
and potential Microsoft Graph API throttling (HTTP 429).

Removing incorrect implications that local-only files may be deleted during
--resync (they will instead be uploaded, unless destructive cleanup modes
are explicitly used).

Strengthening safety guidance by recommending:

Maintaining a current backup of the sync_dir

Running the same command with --dry-run before executing a real --resync

Enabling use_recycle_bin so locally triggered online deletions are preserved

Improved formatting and readability for terminal output.

This change enhances user understanding, reduces the likelihood of accidental
data loss, and aligns runtime messaging with the client’s actual synchronisation
logic and documented behaviour.
2025-12-12 12:47:29 +11:00
abraunegg
324d3000e4
Update readme.md (#3563)
* Update Features to be clear on the capabilities of this client
2025-12-12 08:31:50 +11:00
abraunegg
bbe3f40a0b
Clarify what is enabled with 'display_manager_integration' (#3554)
* Clarify what is enabled with 'display_manager_integration' to avoid the misconception this need to be enabled to use the recycle bin feature
2025-12-11 09:51:55 +11:00
abraunegg
11e07c43bd
Harden logging initialisation: fall back to home directory when log_dir is not writeable (#3555)
This update improves the robustness of application logging by ensuring that invalid or non-writeable log directory configurations no longer cause the client to exit unexpectedly.

Key changes:
* The calculateLogDirectory() function now performs an explicit writeability check on the resolved log_dir path.
* If the directory exists but cannot be written to (e.g., permissions such as /var/log/onedrive owned by root or another user), the client logs an error and automatically falls back to using the user’s home directory for runtime logs if enabled.
* Runtime behaviour now matches the intended design: logging misconfiguration must never stop or terminate the application.
2025-12-03 07:26:38 +11:00
abraunegg
44f68ca683
Prevent mis-configuration where 'recycle_bin_path' is inside 'sync_dir' (#3552)
This update adds validation to ensure the configured 'recycle_bin_path' is not located within the 'sync_dir'.
If the recycle bin is a child of the sync directory, any file moved into the recycle bin during online delete processing would be detected as a new local file and uploaded back to Microsoft OneDrive, creating a loop of re-uploads.

The client now:
* Expands and normalises the 'recycle_bin_path' (including tilde handling)
* Verifies that the resolved path is outside the configured 'sync_dir'
* Fails fast with a clear error message if the configuration is unsafe
* Prevents data churn, unexpected uploads, and confusing behaviour for users

This ensures correct, predictable behaviour when `use_recycle_bin = true` and avoids accidental mis-configuration.
2025-11-29 10:33:47 +11:00
abraunegg
6bc946f486
Add debug logging output redaction (#3549)
* Add debug logging output redaction covering sensitive items and PII
2025-11-29 07:21:34 +11:00
abraunegg
a4598fe358
Clarify 'sync_list' rules in documentation (#3551)
* Clarify 'sync_list' rules and clearly articulate which rules are computationally expensive.
2025-11-28 08:38:58 +11:00
abraunegg
bdf3a77dbe
Update broken link for FreeDesktop.org Trash Specification (#3550)
* Update broken link for FreeDesktop.org Trash Specification and add graphic
2025-11-27 18:46:41 +11:00
abraunegg
9c61370167
Perform safeBackup() on deleted items only when a hash change is detected (#3546)
* When Microsoft OneDrive sends a JSON for a deleted item, rather than blindly calling safeBackup() when the item to be deleted is determined to not be currently in sync with the local filesystem, perform some addition validation and only perform safeBackup() if there is a hash difference to the prior known state
2025-11-24 11:59:27 +11:00
abraunegg
85b6fa2a9b
Fix that safeBackup crashes when attempting backing up a non-existent local path (#3545)
* Fix safeBackup() so that the application does not crash when probing if path is a directory and the actual path no longer exists locally
2025-11-24 09:43:37 +11:00
abraunegg
dfc305ded1
Update hash functions read efficiency to support 'on-demand' work (#3544)
* Remove computeSha1Hash() as not used
* Update computeQuickXorHash() and computeSHA256Hash() for read efficiency to support 'on-demand' work
2025-11-24 09:07:40 +11:00
abraunegg
cf428828a1
Fix Bug #3536: Fix that large files fail to download due operational timeout being exceeded (#3541)
* Adjust default 'operation_timeout' value to align to CURLOPT_TIMEOUT default
* Update downloadFile() to ensure correct handling when operational timeouts occur to correctly resume download and use correct offset for download
2025-11-20 20:42:05 +11:00
abraunegg
4f634b8340
Update OAuth2 Authentication Process Diagrams (#3537)
* Update OAuth2 Authentication Process Diagrams
2025-11-17 06:50:48 +11:00
abraunegg
16eccc492a
Fix Bug #3531: Fix that websocket do not work with Sharepoint libraries (#3533)
* Fix that websocket do not work with Sharepoint libraries by updating the 'websocketEndpoint' to use the 'drive_id' value when specified in the configuration file.
2025-11-15 06:45:57 +11:00
abraunegg
408bb80a3c
Add MX Linux (#3532)
* Add MX Linux details
2025-11-14 06:49:02 +11:00
abraunegg
b59c1dbc2d
Fix Bug #3522: OneDrive client create many file versions when file modified time differ (#3526)
* Fix issue where the client will create many file versions when file modified time differ locally to that online, and does not evaluate which timestamp should be corrected - online or local
* Add missing TOC entry in application-config-options.md
2025-11-12 19:40:31 +11:00
abraunegg
78955e0de2
Add configuration option 'disable_version_check' (#3530)
* Add configuration option 'disable_version_check' to allow users to configure whether the application will check the GitHub API for release information to assist in advising users of new application releases.
2025-11-12 07:28:04 +11:00
abraunegg
f860744252
Update Documentation (#3527)
* Update install.md for readability
* Update ubuntu-package-install.md for readability and remove EOL platforms
2025-11-10 18:20:21 +11:00
abraunegg
b5bbf4f292
Release files for 2.5.9 (#3517) v2.5.9
* Release files for 2.5.9
2025-11-06 11:00:35 +11:00
abraunegg
7bb509c749
Fix Bug #3512: Unexpected deletion of empty nested folders during first sync with 'sync_list' (#3513)
* Fix unexpected deletion of empty nested folders during first sync with sync_list
* Add missing line breaks in usage.md
2025-11-06 10:39:44 +11:00
abraunegg
40cba66c31
Fix Bug #3514: Fix very high CPU & Memory utilization with 2.5.8 when using --upload-only (#3515)
* When using --upload-only , the inbuilt WebSocket process is disabled and not used, thus, there is a spinlock that needs to be taken care of when using --upload-only
2025-11-06 05:09:26 +11:00
abraunegg
529fb4d85e
Release files for 2.5.8 (#3511) v2.5.8
* Release files for 2.5.8
2025-11-05 11:35:04 +11:00
abraunegg
3082e7a4bd
Update Documentation (#3510)
* Update Documentation
2025-11-05 10:35:42 +11:00
abraunegg
2fdc3a6591
Handle WebSocket 'echo' of local change (#3509)
* When using WebSockets to listen for remote change, a local change will trigger an 'echo' of that local change, which we need to debounce if this signal is received within a short window
2025-11-04 14:27:23 +11:00
abraunegg
8cfbffa24a
Fix the fetching of maximum open files to be more POSIX compliant (#3508)
* Fix the fetching of maximum open files to be more POSIX compliant
2025-11-04 10:09:56 +11:00
abraunegg
40e0ca4462
Implement Desktop Manager Integration for GNOME and KDE (#3500)
Implement full “Display Manager Integration” support for both GNOME and KDE desktop environments. This new feature allows the OneDrive Client for Linux to detect the active desktop session and automatically:

* Register the configured sync_dir as a “special place” or sidebar entry within the file manager (Nautilus on GNOME; Dolphin on KDE).
* Apply a custom “onedrive” folder icon to the synchronisation directory when the installed icon theme supports it.
* Cleanly install and uninstall required resources (icons, bookmarks, file manager integration) via the Makefile’s install and uninstall targets, thereby supporting system-wide installations, packaging workflows, and per-user installs.
* Introduce a new configuration option display_manager_integration (boolean) to enable or disable this integration behaviour at runtime.
* Update documentation and usage guidance to clearly explain what “Display Manager Integration” means, what this client implements (sidebar entry + icon) and what features remain out-of-scope (context menus, overlay badges, tray icons).
* Ensure safe, idempotent integration logic for both GNOME and KDE (bookmark manipulation, icon theme detection, cache refresh) with fallbacks and minimal dependencies.

With this merge, users installing via make install or system packages will benefit from enhanced desktop usability: the OneDrive folder appears visibly and intuitively within their standard file manager sidebar, making access and identification simpler. At the same time, the core sync engine remains focused on reliable file synchronisation, with the desktop integration layer remaining optional and disabled by default unless explicitly enabled via configuration.
2025-11-03 14:26:49 +11:00
abraunegg
defada7daf
Update Documentation for v2.5.8 (#3507)
* Update Documentation for v2.5.8 release
2025-11-03 10:31:14 +11:00
abraunegg
382437922a
Fix Bug #3501: When using --dry-run use tracked renamed directories (#3503)
* When using --dry-run use tracked renamed directories to avoid falsely indicating local data is new and uploading as new data
* Ensure comparison of renamed paths is consistent
2025-11-01 04:42:59 +11:00
abraunegg
bd94f821b7
Fix Bug #3501: If using 'sync_list' only add new JSON items early (#3505)
* When using 'sync_list' and renaming online entries, only update the local database if the provided JSON is not in the database already to allow applyPotentiallyChangedItem() to operate as expected
2025-10-31 09:32:37 +11:00
abraunegg
1e48e42363
Implement FR #3491: Add ONEDRIVE_THREADS Docker option (#3494)
* Add Docker environment variable 'ONEDRIVE_THREADS' to control the value for the number of worker threads used for parallel upload and download operations.
2025-10-28 05:55:08 +11:00
abraunegg
e1cf452ad9
Update ubuntu-package-install.md (#3496)
* Update Step 1 to be clearer
2025-10-25 12:11:16 +11:00
abraunegg
89aed84bb2
Update checkJSONAgainstClientSideFiltering() to avoid multiple calls to computeItemPath() (#3489)
* Update checkJSONAgainstClientSideFiltering() to avoid multiple calls to computeItemPath()
2025-10-24 08:30:27 +11:00
Eduard Abdullin
5458660faf
Add support for AlmaLinux (#3485)
* Add support for AlmaLinux

---------------------
Signed-off-by: eabdullin <ed.abdullin.1@gmail.com>
2025-10-23 05:58:21 +11:00
abraunegg
6aa9d88799
Update how the file path is computed when there are 'skip_dir' entries (#3484)
* Update how the file path is computed when there are 'skip_dir' entries, so that the client is passing in a valid file path for 'skip_dir' evaluation
2025-10-20 10:29:58 +11:00
abraunegg
c7a96a6640
Fix Bug #3475: Fix Shared Folder data being deleted due to 'skip_dir' entry of '.*' (#3476)
* Add missing element of shared folder DB tie values to idsFaked when using --dry-run
* Ensure that bad entries of '.*' are not added for 'skip_dir' to align to 'skip_file'
* Update application messaging on what configuration option to use to skip .files and .folders
2025-10-20 10:22:34 +11:00
Daniel
a2d1a7cd49
Fix Bug #3479: Fix missing user information when syncing shared files (#3483)
* fix: database inconsistency due to unassigned variable

* fix: more debug logging, setting sharedByFolderName to Email as fallback

---------

Co-authored-by: Daniel Schiffner <d.schiffner@dipf.de>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-10-19 06:28:09 +11:00
abraunegg
c15a9e7b29
Fix Bug #3478: Fix application crash after deleting file locally (#3481)
* Fix application crash after deleting file locally by removing a TOCTTOU (Time-of-check to time-of-use) race condition when deleting a file.
* Improve inotify removal messaging when exiting application to avoid confusion
2025-10-18 06:06:12 +11:00
abraunegg
46ec991995
Fix WebSocket connection failure on libcurl 8.12.x by forcing HTTP/1.1 and disabling ALPN/NPN (#3482)
Newer libcurl releases (8.12.x and above) default to HTTP/2 via ALPN, causing the WebSocket RFC6455 handshake to fail with "code:3, message: Bad request".

This change forces HTTP/1.1 and disables ALPN/NPN on WebSocket connections, restoring correct 101 Switching Protocols behaviour.
2025-10-17 20:50:20 +11:00
abraunegg
2f339c5663
Implement FR #3435: Add option to remove source folders (#3473)
* Add option to remove source folders when using --upload-only --remove-source-files
* Parental path will only be removed if path is empty - that is, no other folders or files present
2025-10-14 06:47:51 +11:00
abraunegg
42f7ad95e8
Update readme.md (#3470)
* Re-order feature functionality
2025-10-11 08:42:00 +11:00
Aleix Mariné-Tena
d9e00ee63c
Update docker.md (#3467)
* Document the correct ways to customise runtime behaviour

---------

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-10-10 14:34:14 +11:00
Emily Mabrey
f27874a05a
Fix config example for max_curl_idle (#3469)
* Fix incorrect example for max_curl_idle using monitor_fullscan_frequency
2025-10-10 14:16:48 +11:00
abraunegg
35e10ea8e6
Fix Bug #3463: Force DNS Timeout when forcing a libcurl fresh connection (#3468)
* Force DNS Timeout when forcing a libcurl fresh connection which will force DNS resolution as stale cache internally in curl is not being released
* Fix that 'online' state is correctly set if Internet access is not available at startup when using --monitor
2025-10-10 13:55:31 +11:00
abraunegg
18d267912e
Implement FR #3364: Add --download-file feature (#3459)
* Add feature request --download-file to download a single file based on the online path
2025-10-07 18:07:05 +11:00
abraunegg
10048d8bca
Implement FR #2360: Add websocket notification support (#3413)
* Implement FR #2360: Add websocket notification support
2025-10-05 07:09:27 +11:00
abraunegg
566e4feeb0
Implement FR #3416: Dotfiles in sync_list should be synced even when skip_dotfiles = "true" (#3456)
* Add feature request to sync dotfiles in sync_list should be synced even when skip_dotfiles = "true"
2025-10-04 19:55:59 +10:00
abraunegg
f4cb8ca0aa
Update Client Architecture Documentation: Add details around how the client processes the online state (#3458)
* Add new sections to documentation around how the client processes the online state
2025-10-04 07:35:08 +10:00
abraunegg
5d11ea64ed
Fix Bug #3452: 'use_intune_sso' and 'use_device_auth' cannot be used together (#3453)
* Add operational conflict as 'use_intune_sso' and 'use_device_auth' cannot be used together
2025-09-29 17:28:51 +10:00