* 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
* 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>
* 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
* 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
* 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
* 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
* Fix createRegexCompatiblePath to escape characters that cause issues for regex parsing
* Update 'matchSegment' to reuse 'createRegexCompatiblePath' to be consistent in regex creation
* 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
* 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
* 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>
* 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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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.
* Add code to support using 'display_processing_time' for functional performance
* Cleanup use of getFunctionName() so this is only called once and re-used
* 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
* 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
* 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
* 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
* Specifically add a check for the 'sea8cc6beffdb43d7976fbc7da445c639' string in the Microsoft OneDrive Personal Account Root ID response that denotes that the account cannot access Microsoft OneDrive at this point in time.
* Make sure the error gets flagged in the GUI so the user is aware of the problem