Commit graph

1,691 commits

Author SHA1 Message Date
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
Andrei Horodniceanu
025c756c0c
Implement FR #2472: Add gdc support (#3213)
* Makefile.in: Use $^ for specifying dependencies

This fixes out-of-source builds.

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

* Makefile.in: Pass required build flags outside of DCFLAGS variable

This allows specifying custom DCFLAGS when invoking make

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

* Move compiler specific options into configure.ac from Makefile.in

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

* Add support for building with gdc

Closes: https://github.com/abraunegg/onedrive/issues/2472
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>

* docs: Document gdc support

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

---------

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-04-16 19:03:12 +10:00
abraunegg
0d8a5728cf
Update testbuild.yaml (#3216)
* Ubuntu 20.04 runners are retired and removed as per: This is a scheduled Ubuntu 20.04 retirement. Ubuntu 20.04 LTS runner will be removed on 2025-04-15. For more details, see https://github.com/actions/runner-images/issues/11101
2025-04-16 19:00:30 +10:00
abraunegg
3a34a0049a
Fix Bug #3208: Resolve crash when getpwuid() breaks when there is a glibc version mismatch (#3210)
* Remove enforce() as this will exit the application, attempt to get the user details safely
2025-04-15 05:28:14 +10:00
abraunegg
f76dcdaea4 Update usage.md
* Remove ambiguity around 'threads' option
2025-04-13 18:54:06 +10:00
abraunegg
3c0559443a
Fix Bug #3203: Revert initial 'sync_list' rule segment|depth check and implement a better applicable mechanism check (#3204)
* Remove 'if (pathSegments < wildcardDepth) {' check introduced via 8ecdbab20f as this breaks path checking on --upload-only
* Update PR based on testing against bug report
* Update allow.txt
2025-04-11 18:47:13 +10:00
abraunegg
1e9765d0f2
Update Docker and Podman documentation (#3202)
* Update Docker and Podman documentation around environment variable formatting due to #3198
* Update language
2025-04-06 06:20:35 +10:00
abraunegg
51a898a14d
Update 'config' file to align to application options (#3200)
* Update default config file to have a brief description about the config option
* Align config file to current options
* Update reference where the config options are documented
2025-04-05 08:06:44 +11:00
abraunegg
7d5f635503
Fix Bug #3186: Fix that empty 'skip_file' forces resync indefinitely (#3194)
* If the user sets an empty 'skip_file' configuration, do not reset this to the application defaults
2025-04-05 05:57:30 +11:00
abraunegg
b2945ebe4f
Fix Bug #3171: Fix empty folder or folder with onenotes are deleted online when content is shared from a SharePoint Library Document Root (#3163)
* Fix empty folder or folder with onenotes are deleted online when content is shared from a SharePoint Library Document Root
* Add DB file debug output to detail if DB file is present or not
2025-04-04 18:56:23 +11:00
abraunegg
0b4213a5ba
Update remaining completion files (#3197)
* Update remaining completion files
2025-04-04 06:12:23 +11:00
hideo aoyama
2d2a2c3848
Add missing cli options (#3195)
* Update 'complete.bash' to align with application options
2025-04-04 05:16:34 +11:00
Romadelf
c851b21eb0
Ignoring files created during configure to be consistent with other files generated from .in templates (#3188)
* Ignoring files created during configure to be consistent with other files generated from .in templates
2025-04-04 05:14:33 +11:00
abraunegg
519e9ffb3a
Fix Bug #3175: Update 'sync_list' line parsing to correctly escape characters for regex parsing (#3184)
* Fix createRegexCompatiblePath to escape characters that cause issues for regex parsing
* Update 'matchSegment' to reuse 'createRegexCompatiblePath' to be consistent in regex creation
2025-03-30 07:39:21 +11:00
abraunegg
9d329bcafc
Fix Bug #3167: Fix JSON exception on webhook subscription renewal due to 308 redirect (#3172)
* Fix JSON exception on subscription renewal when a 308 response is provided by the Microsoft Graph API
* Add support for 307 and 308 re-directions
* Update how create subscription is performed and what resourceItem path is used
2025-03-28 08:53:38 +11:00
abraunegg
90eef7c195
Fix Bug #3165: Validate raw JSON from Graph API for 15 character driveId API bug (#3174)
* Validate the raw JSON files as provided by Microsoft Graph API for the 15 character driveId bug
* Fix application of newDriveIdEntry
* Update PR based --local-first --resync use and obtaining the correct data for Shared Folders
* Perform driveId length on root JSON to avoid a false positive on testing driveId not being equal to appConfig.defaultDriveId to flush out 'root' remote drive entries that we dont add
2025-03-28 08:50:19 +11:00
abraunegg
737244e5c7
Fix Bug #3165: Correct logging output for 'skip_file' exclusions (#3176)
* Correct logging output for 'skip_file' exclusions
2025-03-25 06:55:41 +11:00
abraunegg
62c3d87b9f
Fix OneNote file MimeType detection (#3162)
* Fix OneNote file MimeType detection to ensure that the actual MimeType is used and the file extension is matched before excluding
2025-03-21 18:26:40 +11:00
abraunegg
fd74b19cae
Fix regression of Microsoft OneNote package folder being created in error (#3160)
* Fix regression of Microsoft OneNote package folder being created in error
2025-03-20 20:27:44 +11:00
abraunegg
be13f9759b
Release files for 2.5.5 (#3154) v2.5.5
* Release files for 2.5.5
2025-03-17 08:52:03 +11:00
abraunegg
e47f289aac
Support localizedMessage error messages provided by Microsoft Graph API (#3153)
* Support localizedMessage error messages in application output if this is provided in the JSON response from Microsoft Graph API
2025-03-16 12:09:48 +11:00
abraunegg
a3aef26c97
Fix 'Unsupported platform' for inotify watches (#3152)
* Fix 'Unsupported platform' for inotify watches by using the correct predefined version definition for Linux.
2025-03-16 08:48:40 +11:00
Paul Fabozzi
65a48b3de1
Enhancement: Add support for --share-password option when --create-share-link is called. (#3119)
* Update config.d to add support for --share-password
* Update sync.d to add support for --share-password when creating links
* Update config.d fixed bug requiring ARG with --share-password option
* Update application-config-options.md
* Update sync.d to evaluate if the file link share password is an empty string

---------

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2025-03-16 07:47:35 +11:00
abraunegg
ac8cf36046
Update Docker OS versions (#3150)
* Update Docker OS versions March 2025
  * Use Fedora 41
  * Use Alpine 3.21
2025-03-16 07:38:04 +11:00
abraunegg
5d660c3b00
Fix OneDrive Personal Shared Folder removal issue (#3147)
* When removing the a OneDrive Personal Shared Folder locally, ensure we are only removing our 'link' to the folder, not the entire folder from the remote user
* Ensure the 'root' object is removed for the Shared Folder if there are no other 'children' for that Shared Folder parent.
2025-03-10 17:34:30 +11:00
abraunegg
e58896747f
Fix Bug #3115: Add further driveId validation when processing API response data for a OneDrive Personal Shared Folder (#3116)
* Remove 'sea8cc6beffdb43d7976fbc7da445c639' check
* Add further personal account driveId length checks when generating a /delta response for a Shared Folder
* Fix selectRemoteTypeByRemoteDriveId() function to also use the remote item id so that the correct DB record is responded with. This ensures that 'localPathExtension =' reflects the correct local path extension and not some other incorrect local path
* If the 'shared' JSON structure is missing, add a debug message
* Add further checks for invalid 15 character driveId when creating Shared Folder references
* Ensure that the 'driveId' value is correctly fetched and used due to 'UPPERCASE' and 'lowercase' values in API JSON response
* Increase DB version to ensure all old records in the DB are purged
* Sanitise JSON output for debug logging when enabled
* Simplify isValidUTF8Timestamp()
* Debug logging is not correct - missing all single --verbose entries which should be also included when performing a debug capture.
* Based on application debug logs, if /delta fails to send Shared Folders, and the client goes to create these online, we know that these then exist online and are a Shared Folder. Handle in a similar manner to OneDrive Business Shared Folders logic to create the required database tie records if the API fails to send that data originally.
* Remove double call to selectiveSync.isFileNameExcluded
* Align invalid UTF-8 message to be consistent with other UTF-8 failure messages

This PR specifically works around the Microsoft OneDrive change:
* Microsoft moving all OneDrive Personal Accounts to a new backend platform. This is the 'sea8cc6beffdb43d7976fbc7da445c639' change: https://github.com/OneDrive/onedrive-api-docs/issues/1890
* Microsoft failing to provide the Graph API data in the /delta call for accounts moved to the new backend platform: https://github.com/OneDrive/onedrive-api-docs/issues/1891
2025-03-10 06:03:50 +11:00
abraunegg
9051d0d89a
Clarify troubleshooting steps (#3135)
* Clarify required troubleshooting steps
2025-02-24 20:13:33 +11:00
abraunegg
26602b84f1 Add API bug URL for 'sea8x' issue
* Add API bug URL for 'sea8x' issue
2025-02-24 06:38:02 +11:00
abraunegg
efecdf7e8f
Fix Bug #3126: Ignore 'sync_list' directory exclusion to scan for included data (#3130)
* When using 'sync_list' , we need to ignore specific exclusion to scan that path for new data, which may be actually included by an include rule, but the parent path is excluded
2025-02-23 07:13:57 +11:00
abraunegg
8ecdbab20f
Fix Bug #3122: Fix 'sync_list' globbing rule application (#3123)
* Add check for 'globbing' and 'wildcard' rules, that the number of segments before the first wildcard character need to match before the actual rule can be applied
* Only calculate ruleSegments and pathSegments once
* Use same calculation method to count path segments for applicability globbing rule as this is more consistent
2025-02-23 05:35:41 +11:00
abraunegg
a7c3dccb5c
Add account root id check for id account issue (#3129)
* Re-add 'sea8cc6beffdb43d7976fbc7da445c639' check which somehow was removed
2025-02-22 05:32:40 +11:00
abraunegg
f8123a2b0a
Implement FR #2719: Add information about file creator/last editor as extended file attributes (#3113)
* Implement feature request to add information about file creator/last editor as extended file attributes
* On a --resync , if the data exists on disk, and 'write_xattr_data' has been enabled, write the xattr data out
2025-02-20 21:14:04 +11:00
abraunegg
1166f86366
Enhancement: Move curl debug logging to --debug-https (#3120)
* As all the curl engine reuse is now stable, move debug logging of curl engine stack to --debug-https
* Extract the DataCentre information from the http response header to use in application output
* Align 'Remaining Free Space' to accommodate Data Centre output
2025-02-14 15:34:22 +11:00
abraunegg
0216b63c61
Implement FR #3107: Add config option to not set file and directory permissions (#3112)
* Implement configuration option to not set directory and file permissions
2025-02-13 19:27:14 +11:00
abraunegg
0e7d3f15f6
Implement FR #2544: Allow synchronizing smallest files first (#3114)
* Implement 'transfer_order' configuration option to allow the user to determine what order files are transferred in
2025-02-13 19:20:42 +11:00
abraunegg
68b61bef94 Calculate computedItemPath when required
* Calculate computedItemPath when required for Business Accounts and not before
2025-02-10 06:53:47 +11:00
abraunegg
768846a5dd
Fix path calculation for Client Side Filtering evaluations for Personal Accounts (#3111)
* Use original method for Personal Accounts, use new method for Business and SharePoint
2025-02-09 07:27:40 +11:00
abraunegg
96a3c2d7c9
Fix path calculation for Client Side Filtering evaluations (#3106)
* Correct the path calculation for 'skip_dir' evaluations to correctly cater for Shared Folders and the 'root' object
* Add debug logging if 'newItemPath' and requires calculation again before use
2025-02-08 05:32:35 +11:00
abraunegg
1c78078df7
Release files for 2.5.4 (#3098) v2.5.4
* Release files for 2.5.4
2025-02-03 17:55:39 +11:00
abraunegg
7f2d981683
Add './' sync_list rule check (#3097)
* Add './' sync_list rule check as this does not align to the documentation and these rules will not get matched correctly. The user needs to take corrective action.
2025-02-03 08:55:51 +11:00
abraunegg
ad22952167 Fix log output when generating a /delta response
* Fix log output when generating a /delta response
2025-02-03 08:14:03 +11:00
abraunegg
518b152c4c
Add code to support 'display_processing_time' use (#3095)
* Add code to support using 'display_processing_time' for functional performance
* Cleanup use of getFunctionName() so this is only called once and re-used
2025-02-02 08:18:15 +11:00
abraunegg
84a141b1d6
Calculate file transfer metrics in a consistent manner (#3091)
* Add back file transfer metrics which was available in v2.4.x (regression) 
* Calculate file transfer metrics in a consistent manner for all uploads and downloads
2025-01-29 06:38:21 +11:00
abraunegg
e392722b5e
Fix testInternetReachability function (#3087)
* Function should always return a boolean value and not throw an exception
2025-01-25 18:23:48 +11:00
abraunegg
defcd8bf2d
Update usage.md (#3084)
* Update usage.md
2025-01-24 20:15:31 +11:00
abraunegg
15656d31c8
Add OneDrive Personal Drive ID and Remote Drive ID length check (#3086)
* Add a check to ensure that OneDrive Personal Drive ID and Remote Drive ID values are 16 characters, padded by leading zeros if the provided JSON data has dropped these leading zeros
* If OneDrive Personal Account, validate all use of 'onedriveJSONItem["parentReference"]["driveId"].str' within application to ensure consistency in use and application
2025-01-24 19:59:09 +11:00
abraunegg
c60a889397
Fix --single-directory Shared Folder DB entry creation (#3082)
* Ensure that when using --single-directory that if the destination is a Shared Folder, the database records are created in a consistent manner
* Remove 'sea8cc6beffdb43d7976fbc7da445c639' due to 'non-alpha-in-dictionary' code scan result
2025-01-20 18:01:34 +11:00
abraunegg
4418d0d636
Support the moving of Shared Folder Links to other folders (#3052)
* Implement Feature Request #2824 to support the moving of Shared Folder Links to other folders
* Be consistent in log output for Personal Accounts, despite personal accounts not supporting relocatable Shared Folder links
* Update /delta generation message to include the driveId
* Code / Technical change was merged into https://github.com/abraunegg/onedrive/pull/3051 and committed to 'master' via 5a20154726
2025-01-20 10:48:09 +11:00
abraunegg
27a25bef4e
Fix Upload|Download Loop for AIP Protected File in Monitor Mode (#3071)
* Fix Upload|Download Loop for AIP Protected File in Monitor Mode
2025-01-18 07:46:56 +11:00