Commit graph

1,565 commits

Author SHA1 Message Date
abraunegg
0aef31d057
Fix Bug #3337: Fix issue with ExecStartPre statement to be more OS independent (#3348)
* Fix issue with ExecStartPre statement to be more OS independent
2025-06-18 20:53:56 +10:00
abraunegg
f5ec4ab5ff
Fix Bug #3331: Handle a 409 online folder creation response with a re-query of the API (#3335)
* When attempting to create a folder online, generally if the folder is not online, this will generate a 404 error, indicating to this client that the folder must be created. However, if the client then attempts to create it, and this folder now exists, a 409 response is generated. Handle the 409 response better by then performing a re-query of the API for the previously failed attempt and save those details to the database.

* Update process by which selfBuiltPath is calculated, when using 'sync_list' in a --resync scenario against Shared Folders to avoid double adding the Shared Folder Name to the path
2025-06-14 19:13:37 +10:00
abraunegg
95938807b0
Fix Bug #3320: Reduce I/O pressure on SQLite DB Operations (#3334)
* Reduce I/O pressure on SQLite DB Operations
* Update allow.txt - add autocheckpoint
2025-06-14 12:18:02 +10:00
abraunegg
6e5e83843d
Update logging for upsert() function (#3333)
* Add additional logging for upsert() function
* Add missing finalise() for orphan deletion
2025-06-11 16:57:18 +10:00
abraunegg
8ed3ed2bb4
Handle online folder deletion|creation with same name that causes 'id' to change (#3332)
* When an online folder is deleted, then re-created with the same name, the folder 'id' changes. In normal circumstances this is not an issue, but when running the client at the same time, on two separate systems, despite the path being removed and re-created, the 2nd (and subsequent systems) fail to correctly handle this online change correctly as expected, thus, upload|download of data into this changed folder fails to occur. This PR changes the upsert() function to check for this corner case and correct the DB entry for the now updated item id online. This then avoids creating orphan DB records that breaks other functions that rely on correct DB record traversal.
2025-06-11 12:12:47 +10:00
abraunegg
76f616f267
Update minimum compiler version details (#3330)
* Update minimum compiler version details
* Update RHEL RPM documentation
* Update spelling words
2025-06-10 13:31:45 +10:00
abraunegg
3fb54b85c8
Update onedrive.spec.in (#3329)
* Add missing dependencies for v2.5.6
2025-06-10 05:57:42 +10:00
abraunegg
62907d4d58
Update advanced-usage.md (#3327)
* Add note about using 'ntfs-3g-onedrive' to access Microsoft Windows OneDrive folder in dual-boot scenarios
* Update allow.txt - add ntfs
2025-06-09 09:45:05 +10:00
abraunegg
51c4392411
Fix bug that 'items-dryrun.sqlite3' gets erroneously created when running a 'no sync' operation (#3325)
* Fix bug that 'items-dryrun.sqlite3' gets erroneously created when running a 'no sync' operation task such as --logout
2025-06-09 08:00:46 +10:00
abraunegg
42f7afaba8
Update application-config-options.md (#3326)
* Update 'threads' documentation details for clarity on the option and warning message generated
2025-06-09 07:43:16 +10:00
abraunegg
a640f2ff04
Catch unhandled OneDriveError exception due to libcurl failing to access the system CA certificate bundle (#3322)
* Catch unhandled OneDriveError exception when there is a SSL or disk space issue
* Add setDisableSSLVerifyPeer() and setEnableSSLVerifyPeer() functions, but ensure they are not used
* Correct warning messages from PR 3320
* Update allow.txt - add verifypeer
2025-06-08 13:36:18 +10:00
abraunegg
d8d695600a
Update OAuth2 Interactive Authorisation Flow prompts (#3323)
* Update OAuth2 Interactive Authorisation Flow prompts to remove any ambiguity on what actions a user needs to take
2025-06-08 13:20:57 +10:00
abraunegg
1963fcd006 Update readme.md
* Update readme
2025-06-08 07:29:55 +10:00
abraunegg
538ebe4be6 Revert "Update PR"
This reverts commit b020455534.
2025-06-08 07:03:02 +10:00
abraunegg
b020455534 Update PR
* Add functions, but ensure they are not used
* Correct warning messages from PR 3320
2025-06-08 07:00:54 +10:00
abraunegg
cad54dd3a1
Update readme.md (#3319)
* Add missing notable feature to readme.md
2025-06-07 07:36:45 +10:00
abraunegg
1b36249d32
Release files for 2.5.6 (#3317) v2.5.6
* Release files for 2.5.6
2025-06-05 20:06:05 +10:00
abraunegg
edc9f4d6cd
Perform thread check and set as early as possible (#3314)
* Perform thread check and set as early as possible
2025-06-03 08:36:25 +10:00
abraunegg
810197cc05
Implement FR #2693: Implement OAuth2 Device Authorisation Flow (#3313)
Adds support for Microsoft’s OAuth2 Device Authorisation Flow, enabling the client to authenticate using device and user codes on a second device. This is particularly useful for headless or limited-input environments where interactive browser login is not possible.

Includes:
- Initiating device code requests and displaying user instructions
- Polling token endpoint until user authorises the device or the code expires
- Error handling for pending, declined, and expired authorisation states
- Countdown display showing remaining authorisation window

This feature is enabled via the `use_device_auth` config option
2025-06-03 07:47:56 +10:00
abraunegg
c91eafb9b9
Fix Bug #3302: Fix regression of supporting Personal Shared Folders that have been renamed (#3308)
* Fix regression of supporting Personal Shared Folders that have been renamed in users account
2025-06-02 18:32:49 +10:00
abraunegg
0da5f3bed2
Update setLocalPathTimestamp logging output (#3310)
* Update setLocalPathTimestamp logging output
2025-06-01 14:20:17 +10:00
abraunegg
f5d6bd3cfd
Update how threads are set based on available CPUs (#3309)
* Update how threads are set based on available CPUs
2025-06-01 11:31:35 +10:00
abraunegg
2d7191fae2
Fix setting of xattr values if file fails to download (#3307)
* If a file fails to download, path fails to exist. Check path existence before setting xattr values
2025-05-31 06:51:02 +10:00
abraunegg
1725f88673
Fix Bug #3302: Add dbus libs to Docker base build (#3303)
* Add dbus libs to Docker base build
* Update readme with wording updates/tweaks
2025-05-29 06:01:30 +10:00
abraunegg
65e8b663c9
Update readme introduction (#3301)
* Update readme introduction
* Add project background
2025-05-28 06:32:51 +10:00
abraunegg
9113feac81
Ensure file is closed before renaming to improve compatibility with GCS buckets and network filesystems (#3299)
Some filesystems (e.g. GCS FUSE, Samba, NFS) may fail or behave unpredictably when attempting to rename an open file. This update explicitly closes the file before calling rename(), ensuring cross-platform and cloud storage compatibility. The original scope(exit) remains as a fallback to guarantee cleanup.
2025-05-27 05:23:59 +10:00
abraunegg
d9b8966fa4
Force rebuild post GitHub Actions outage (#3298)
* Force rebuild post GitHub Actions outage
2025-05-27 04:51:37 +10:00
abraunegg
aa85634fb2
Fix Docker build post #3274 (#3297)
* Fix Docker build post #3274 due to LDC requiring a default input for build_auth_request() not picked up in prior LDC compilation testing
2025-05-26 17:56:57 +10:00
abraunegg
61e5a1edb6
Implement FR #3209: Add native support for authentication via Intune dbus interface (#3274)
* Adds support for calling `acquireTokenInteractively` and `acquireTokenSilently` via D-Bus
* Parses and handles the full `brokerTokenResponse` object returned by the Intune broker
* Stores and reuses `account` data to enable silent token refresh without repeated interactive authentication
* Ensures the access token and its expiry time are properly calculated and stored for consistent token management
* Fallback to interactive authentication is triggered if silent authentication fails
2025-05-26 17:14:50 +10:00
abraunegg
b496c4e21f
Update 'Client Side Filtering' documentation and handling (#3296)
* Fix documentation around missing 'check_nosync' needing a --resync when enabling / disabling
* Fix documentation around missing 'skip_size' needing a --resync when enabling / disabling
* Validate 'check_nosync' and 'skip_size' when used as part of a config file to trigger --resync
* Validate 'check_nosync' and 'skip_size' when used as part of CLI to trigger --resync
2025-05-26 15:25:04 +10:00
abraunegg
7a7748d3ce
Implement FR #3287: Add validation of bools in config file (#3295)
* Ensure that bool configurations are tested correctly, and for validity as bool values, to flush out badly formatted bool configuration options
2025-05-26 06:42:53 +10:00
abraunegg
594373f8c6
Fix UTC conversion for existing file timestamp post file download (#3294)
* Fix UTC conversion for existing file timestamp post file download due to bug introduced via https://github.com/abraunegg/onedrive/pull/3256/files#diff-3d0d233780406e4f1b1c07c79cdd189b98570ce886995af58a2ce3ed802e551e
2025-05-25 12:53:56 +10:00
abraunegg
4275d0b2a4
Update Documentation - clarify --local-first (#3293)
* Update Documentation - clarify --local-first
2025-05-25 11:55:47 +10:00
abraunegg
8f82919e5b
Only set xattr values when not using --dry-run (#3290)
* We can only set xattr values when not performing a --dry-run operation, as if we are doing --download-only --dry-run .. there is no file locally to set attributes on
2025-05-24 12:28:35 +10:00
abraunegg
3394183771
Dont blindly run safeBackup() if the online timestamp is newer (#3289)
* Dont blindly run safeBackup() if the online timestamp is newer. Only execute this if the local file hash is different. If the timestamp is different, correct the local timestamp
* Be consistent with logging output
2025-05-24 11:57:49 +10:00
abraunegg
cc6a569792
Update hash functions to ensure file is closed if opened (#3288)
* Update computeSha1Hash() , computeQuickXorHash() and computeSHA256Hash() to ensure that the file, if opened, is closed post read, on failure and on exit
2025-05-24 08:56:38 +10:00
abraunegg
ceee0536f5
Fix Bug #3276: Fix implementation of 'write_xattr_data' to support FreeBSD (#3285)
* Fix implementation of 'write_xattr_data' to support FreeBSD to resolve compilation failure
* Update spelling add 'attrnamespace' and 'extattr'
2025-05-22 04:32:30 +10:00
abraunegg
fc10c8cb80
Fix Bug #3276: Fix upload session offset handling to prevent desynchronisation on large files (#3277)
* Ensure the upload offset is recalculated from the server-provided nextExpectedRanges after each fragment upload, instead of relying on a locally incremented offset. This prevents incorrect offset tracking and infinite upload loops, especially for files larger than 4 GiB.
2025-05-22 03:21:17 +10:00
Andrei Horodniceanu
92be98f833
Cleanup Gentoo install documentation (#3279)
* docs/install.md: Remove references to dlang overlay for Gentoo

The package has been added to the main Gentoo repository, users no
longer have to enable a 3rd party overlay to use it.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>

* docs/install.md: Correct available Gentoo architecture

On Gentoo, the package is (currently) tested on x86_64, not i686.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>

---------

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2025-05-18 08:16:40 +10:00
abraunegg
154f145262
Add Gentoo package badge (#3278)
* Add Gentoo package badge
* Fix spelling issue in cgi.d
2025-05-18 06:16:54 +10:00
Andrei Horodniceanu
5a0b941a7c
configure.ac: Support more basename formats for DC (#3273)
Don't restrict the basename of DC to only be dmd, ldc2, or, gdc. This
adds support for values like:
- ldc2-1.40
- dmd-2.110
- x86_64-pc-linux-gnu-gdc

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-05-13 06:58:56 +10:00
Andrei Horodniceanu
71bfab619e
Makefile.in: Pass libraries after source files in compiler invocation (#3272)
When building with gdc alongside the linker flag -Wl,--as-needed the
build fails with unresolved symbol errors. dmd and ldc2 are not
affected since they internally pass the generated object file before
other linker flags.

This also matches the standard GNU make rules.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
2025-05-13 06:53:52 +10:00
abraunegg
73194b0169
Implement FR #3234: Add configurable upload delay to support Obsidian (#3262)
* As of now, Obsidian on Linux does not provide a built-in way to disable atomic saves or switch to a backup-copy method via configuration. Obsidian uses Electron and relies on the default save behavior of its underlying libraries and editor components (like CodeMirror), which typically perform atomic writes for every keystroke. This FR implements a delay in uploading changes to Microsoft OneDrive that is user configurable to better handle how Obsidian works
* Add specific note regarding compatibility with Obsidian and the options that this PR introduces
* Enforce a minimum | maximum for 'inotify_delay'
* Update documentation for feature
* Update 'config' file with 'delay_inotify_processing' option
* Add Ubuntu 24.10 version of curl (8.9.1) to known bad curl versions
* Add Ubuntu version name for Ubuntu 24.10
2025-05-12 06:29:41 +10:00
abraunegg
61ee4ec15b
Add 2 functions to check remoteItem JSON data is present (#3270)
* Add 2 functions to check for the presence of required remoteItem elements to create a Shared Folder DB entries
* Use 2 new functions to ensure data is available to create the required Shared Folder entries
2025-05-11 07:51:33 +10:00
abraunegg
5b281e0c96
Use the JSON data to configure remoteItem DB record before using values in logging output (#3269)
* Use the JSON data to configure remoteItem DB record before using values in logging output
2025-05-11 06:49:15 +10:00
abraunegg
ce1a47ded8 Add Ubuntu 24.10 curl version for compatibility and bug reference
* Add Ubuntu 24.10 curl version for compatibility and bug reference
2025-05-09 14:12:34 +10:00
abraunegg
65a6b8aa2c
Fix performUploadIntegrityValidationChecks() when --disable-upload-validation is being used (#3265)
* If --disable-upload-validation is being used, we have to assume that the online integrity is OK, so that the application does not try and then falsely download the online file that it is not meant to download
2025-05-08 05:46:41 +10:00
abraunegg
52dc120a2f
Fix getRemainingFreeSpaceOnline() (#3264)
* In some API JSON responses, the API data detailing remaining free space online is returned in an inconsistent manner. Update getRemainingFreeSpaceOnline() function to handle this so that the client has a reliable 'quotaAvailable' status to use when uploading new files
2025-05-07 19:36:55 +10:00
abraunegg
4736b79f56
Update Client Architecture Documentation (#3261)
* Update Client Architecture Documentation
* Fix wording in 'usage.md'
2025-05-04 10:31:16 +10:00
abraunegg
acda30e3f6 Update usage.md
* Explicitly add 'Obsidian' as an editor that performs atomic saves.
2025-05-04 07:40:35 +10:00