Commit graph

1,539 commits

Author SHA1 Message Date
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
abraunegg
5c9a055733
Update usage.md (#3260)
* Add links to additional documentation based on feedback in https://github.com/abraunegg/onedrive/issues/3257
2025-05-03 10:40:07 +10:00
abraunegg
831445f616 Update usage.md
* Add missing TOC link for 'Client Documentation'
2025-05-03 09:13:55 +10:00
abraunegg
57dbb4e492
Update force session upload logging (#3259)
* Update force session upload logging
* Ensure if we are going to create directories online, this is not the OneDrive root that is being created
2025-05-03 07:00:06 +10:00
abraunegg
bad8e7bb20
Fix Bug #3228: Update how local timestamps are modified (#3256)
* Add a new configuration option 'force_session_upload' so that the local timestamp is uploaded and used by the API directly, rather than the API generating its own timestamp
* Update setLocalPathTimestamp() function to only set the timestamp of the local file if this is determined to be actually required
* Update allow.txt - add fracsec, howto
* Add config option 'force_session_upload' to 'config' file
* Add 'Compatibility with Editors and Applications Using Atomic Save Operations'
* Update application-config-options.md to document 'force_session_upload' option
* Add usage note for 'force_session_upload' option as a recommendation for applications that use atomic saves
* Update usage.md - add link(s) to other docs for easier reference / visibility
2025-05-03 06:16:34 +10:00
abraunegg
a51fabc22c
Fix Bug #3250: Be consistent with application output when skipping integrity checks (#3254)
* Be consistent with application output when skipping integrity checks. If integrity validation has been disabled, the user has configured this, do not sent a GUI or normal application log output.
* Update allow.txt - add missing words
2025-04-30 06:23:26 +10:00
Paul Cuttriss
7650fc9845
Update install.md for small changes in Fedora > 41 (#3252)
* Update dnf install command for development tools with dnf5
* Modify gnupg/common.conf to comment out use-keyboxd while running dmd install.

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-04-30 05:56:13 +10:00
abraunegg
715cf3e9e6
Fix Bug #3245: Handle API 403 response when file fragment upload fails (#3246)
* Catch a 403 Access denied response and handle differently to other errors where a re-try is possible
2025-04-30 05:53:35 +10:00
abraunegg
c7c07b12a7
Enhancement: Update 'skip_file' documentation and option validation (#3251)
* Update 'skip_file' documentation as to why the existing defaults exist
* Add warning message about 'default' entries for 'skip_file' missing aligning to documentation
2025-04-28 08:58:32 +10:00
abraunegg
102ecae672
Fix Bug #3241: Test parental structure for sync_list inclusion (#3243)
* When the 'sync_list' rules only use anywhere rules, a path that is meant to be included will be excluded as the parental path actually is not part of the path being tested. When adding inotify watches, before we return, check the path tree for inclusion via sync_list
2025-04-28 08:56:12 +10:00
abraunegg
ae08287cbc
Update configure.ac (#3249)
* Use static date value for PACKAGE_DATE for man page date as Debian 'reproducible' build process forces a future date to rebuild any code to determine reproducibility. The challenge here is that the application was dynamically configuring the date for the man page, based on *when* the build was occurring. This was then being flagged by Debian as an 'unreproducible' build when technically, the actual binary is what should be tested as being reproducible, not the man page .... so to appease the Debian false positive stupidity, make the man page date now static, rather than dynamic.
2025-04-27 14:35:38 +10:00
Yuan Liu
a95bd83604
Fix args printing in dockerfile entrypoint (#3248)
* Fix args printing in dockerfile entrypoint
2025-04-27 14:14:00 +10:00
abraunegg
5f95e4f018
Add a notification to user regarding number of objects received from OneDrive API (#3247)
* Add a notification to user regarding number of objects received from OneDrive API if this equals 300K or above
2025-04-27 10:57:19 +10:00
abraunegg
b7e61c93e8
Fix Bug #3237: Fix handling of POSIX check for existing online items (#3238)
* Enhance POSIX compliance test by performing a toLower conversion to ensure strings being tested are exactly the same
* Add debug logging line when lowercase match of input values occur
* If a 'file' is found at that location, debug output the contents earlier for easier logfile analysis
2025-04-27 07:40:51 +10:00
abraunegg
a403bdf9fa
Update ubuntu-package-install.md (#3244)
* Add Ubuntu 25.04 OpenSuSE Build Service details
2025-04-27 07:14:13 +10:00
abraunegg
25c0dea3b6 Update install.md
* Update how to install using the Fedora|EPEL Package Repositories
2025-04-26 19:33:45 +10:00
abraunegg
63f8f9c12e
Fix online path creation process (#3233)
* Fix online path creation to ensure parental path structure is created in a consistent manner
* Avoid redundant calls to create the same parental structure
2025-04-23 09:56:31 +10:00
abraunegg
31313516e4
Change logging output level for JSON elements that contain URL encoding (#3232)
* Change logging output level for JSON elements that contain URL encoding
2025-04-23 06:59:14 +10:00
abraunegg
5b41409ad6
Update Fedora Docker image to Fedora 42 (#3231)
* Update Fedora Docker image to Fedora 42
2025-04-23 06:47:31 +10:00
abraunegg
1d50971bad
Fix 'sync_list' anywhere rule online directory creation (#3229)
* When using 'sync_list' anywhere rules, if an anywhere rule is being used for files, ensure that the parental path is always created online , or at least is available online, so that the matched file can be uploaded to the correct path online
2025-04-23 05:19:31 +10:00
abraunegg
898f350336
Implement FR #3142: Add local recycle bin or trash folder option (#3168)
* This commit implements Feature Request #3142 by introducing a configurable local recycle bin or trash folder mechanism within the OneDrive Client for Linux. This enhancement provides users with a safeguard against unintended data loss during synchronisation operations. This capability is designed to be compatible with the FreeDesktop.org Trash Specification.
2025-04-23 04:28:32 +10:00
abraunegg
68ae5f0b99
Fix Bug #3193: Fix local path calculation for Relocated OneDrive Business Shared Folders when using --resync (#3227)
* Update code to handle existing local data in a --resync scenario
2025-04-22 14:31:01 +10:00
abraunegg
d8ecdf3cd3
Fix Bug #3193: Fix local path calculation for Relocated OneDrive Business Shared Folders (#3226)
* Fix the local path calculation function to correctly account for any local path folder structure where a OneDrive Business Shared Folder may be located.
2025-04-22 11:22:07 +10:00
abraunegg
d084f0b584
Fix Bug #3223: Fix uploading of modified files when using --upload-only & --remove-source-files (#3224)
* When in a --upload-only & --remove-source-files scenario, modified files may not be in the database, even more so in a --resync scenario. When this happens, there is no DB entry regarding the detected modified file to be uploaded, thus, values are never set
* Fetch online details when there is no DB record available
* Ensure that if --upload-only & --remove-source-files is being used, remove the modified local file
* Ensure removal when using --upload-only & --remove-source-files , this is done in a consistent manner
2025-04-21 07:13:39 +10:00
Andrei Horodniceanu
7ed766830c
Update Gentoo install documentation (#3222)
* docs/install.md: Update Gentoo documentation

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

* contrib: Remove Gentoo ebuild

Drop the Gentoo ebuild in here in favor of using the one in the Gentoo
dlang overlay, since the latter better follows the Gentoo standards.

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

* Update allow.txt

* Add 'eselect' and 'onlydeps'

---------

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-04-20 07:36:56 +10:00
abraunegg
fb4c16a622
Fix Bug #3220: Add check for invalid exclusion 'sync_list' exclusion rules (#3221)
* Add a check for invalid exclusion 'sync_list' rule(s) - '!/*' or '!/' .. warn that this rule will not be used and to read the documentation for 'sync_list'
2025-04-19 19:08:42 +10:00
abraunegg
d29a737f3f
Fix Bug #3212: Handle error opening file when computing file hash (#3214)
* Despite code validation and the file just being written to disk, and the check passing that the file exists, handle that we now cannot open the file that was just created and wrote data to. Catch any error when attempting to open file to generate the file hash
2025-04-17 07:14:54 +10:00