Commit graph

781 commits

Author SHA1 Message Date
JC-comp 3d249b8d10
Fix: Initialization and Error Handling for Libnotify (#2659)
* fix libnotify
* Add notification error handling
2024-03-10 11:18:54 +11:00
abraunegg 75c3d0d939
Implement Feature Request #1300 - Support the syncing of individual business shared files (#2646)
* Implement Feature Request #1300 - Support the syncing of individual business shared files
2024-03-09 07:15:11 +11:00
abraunegg e895a1174c Update sync.d
* Change local directory creation to a reusable function
2024-02-26 10:32:53 +11:00
JC-comp 333ddbefea
Fix monitor response time (#2635)
* Sleep only when there are no upcoming events.
* Add constraint to prevent starvation.
2024-02-21 06:45:03 +11:00
JC-comp 03386c1499
Seperate OneDriveWebhook from OnedriveAPI instance (#2607)
* Separate OneDrive webhook from OneDriveAPI
* Ensure compatibility with the monitor mode
2024-02-21 05:13:26 +11:00
abraunegg fecec1ba72 Handle #2626 | Case 2-1 and Case 2-2 items
* Specifically resolve #2626 | Case 2-1 and Case 2-2 items
2024-02-19 10:29:49 +11:00
JC-comp b4c10e6eee
Shutdown Inotify Monitor Gracefully (#2628)
* Adjust pipline
* Shutdown monitor
* Backward compatible for ldc v1.20.1
* Fix shutdown process
* Update logging output and logging levels
---------

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2024-02-14 05:02:48 +11:00
JC-comp a92221bb50
Add support for batched local monitor processing (#2609)
* Fix file upload fallback for all scenario
* Add support for batched monitor
* Add recursive match
* Adjust logging output
* Add error handling
2024-02-12 17:12:20 +11:00
abraunegg 7621bbab65 Update log.d
Fix indentation
2024-02-12 16:45:55 +11:00
JC-comp c7bfd0da10
Implement Blocking Logger Mechanism (#2627)
* Replace polling logger
* Backward compatibility with ldc v1.20.1
2024-02-12 16:33:44 +11:00
abraunegg 1be74fc982 Resolve Issue #2625
* Local files should be safely backed up when the item is not in sync locally to prevent data loss when they are deleted online
2024-02-12 09:45:15 +11:00
abraunegg d2a78be396 Resolve that upload session are not canceled with resync option
* Resolve that upload session are not canceled with resync option
2024-02-11 17:46:07 +11:00
abraunegg 83726ac4de Refine Shared Folder Handling
* Update Shared Folder Handling so when adding a SharePoint Library as a Shared Folder to a Business Account these are correctly handled.
* Validate that DB matches in 'online first' vs 'local first' when using Shared Folders and SharePoint added libraries (in the case of Business Accounts)
* Tested and revalided with OneDrive Business Account with 'sync_business_shared_items = "true"'
* Tested and revalided with OneDrive Business Account with 'sync_business_shared_items = "false"'
* Tested and revalided with OneDrive Personal Account
2024-02-11 11:29:27 +11:00
JC-comp 1630ae37f3
Suppress processing dots in verbose mode (#2622)
* Suppress processing dots in verbose mode
* Fix coding style
2024-02-04 15:34:45 +11:00
abraunegg 6d3b96bdc8 Update sync.d
* Ensure that 'cachedOnlineDriveData' contains valid quota data if using --local-first
* In a --local-first scenario, query the DB for unique driveId's rather than use 'cachedOnlineDriveData' which may not be fully populated
2024-02-04 15:03:34 +11:00
abraunegg d0214a8624 Update sync.d
* If the timestamp was corrected locally, and the files are now equal, save the data to the database to ensure this record is kept
2024-02-04 07:51:37 +11:00
abraunegg 627726edd1 Update sync.d
* Fix regression introduced before 'alpha-5' somewhere
2024-02-04 06:49:27 +11:00
JC-comp f773549b5a
Add error handling for version check (#2615)
Resolves the issue where progress crashes when the GitHub API is unavailable
2024-02-04 06:05:25 +11:00
abraunegg 593c6ead80 Change quota tracking and handling
* Change how online space available is being tracked to significantly reduce quota API calls when uploading new or modified data
2024-02-03 05:49:07 +11:00
JC-comp 1a3724d44b
Add processing dots for all long running operation (#2606)
Changes
- Add helper for processing log with message and dots
- Set a rate limit of 1 second for processing dots.
- Showing processing dots during
    1. db consistency check
    2. file system walk.
2024-01-27 10:03:46 +11:00
JC-comp dbe92514c2
Refactoring CurlEngine + Add Curl Socket Reuse Support (#2604)
* Refactor CurlEngine
- Add socket cleanup/setup/execution
- Add response class

* Add support for reusing curl socket

* Fix deconstruct brhavior
2024-01-27 09:55:11 +11:00
JC-comp 8094d86ed5
Fix file upload fallback (#2603)
* Fix file upload fallback
2024-01-25 13:18:54 +11:00
abraunegg 5a32a3298d Update sync.d
In a --resync --local-first scenario, a Shared Folder will always be 'remote' so we need to check the remote parent id, rather than parentItem details and ensure we have a DB Tie record for the shared folder in the DB
2024-01-24 22:56:45 +11:00
abraunegg d5185e5207 Update sync.d
* Move 'thisFileSize = getSize(fileToUpload)' back to original location
* Add check if path exists before attempting upload
2024-01-24 08:12:40 +11:00
abraunegg e2f1b68b1a Update sync.d
* Whenever the function is being returned, ensure that API instance is shutdown and destroyed
2024-01-22 08:25:51 +11:00
abraunegg deb63b6e76 Update util.d
Fix readLocalFile for zero byte files
2024-01-22 07:57:47 +11:00
abraunegg e92947ea32 Update path validation
* Update check for ASCII control codes and specific non-ASCII control characters
* Add UTF-16 path validation check
2024-01-21 16:15:56 +11:00
abraunegg f2414f4a56 Update sync.d
* Update logging output for added clarity
2024-01-21 07:11:58 +11:00
abraunegg c8d29c8231 Add libcurl timeout on handle messaging
* Add libcurl timeout on handle messaging to use 'ip_protocol_version' to set what IP protocol to use. Testing has shown that when this is triggered, it is libcurl having an issue with IPv6 DNS resolution.
2024-01-20 07:41:53 +11:00
abraunegg 814d364c13 Update libcurl socket reuse handling
* Clarify CURLOPT_CONNECTTIMEOUT in documentation
* Clarify CURLOPT_TIMEOUT in documentation
* Add 'threads' as a config file option to control the number of threads used, default of 8, max of 16
* Change CURLOPT_CONNECTTIMEOUT value to v2.4.x value default of 10 seconds
* Configure libcurl to reuse connections
2024-01-20 06:15:33 +11:00
abraunegg 4e93777d7a Fix edge case file upload bugs when using --local-first
* Add PR 2527v2 to 'alpha-5': Fix edge case file upload bugs when using --local-first
2024-01-20 05:09:17 +11:00
abraunegg e470b21818 Update sync.d
* Add UTC note when detailing that there is a time difference
2024-01-19 09:08:50 +11:00
abraunegg a1f10cc5eb Update sync.d
* Add further timestamp qualifications
2024-01-18 18:56:22 +11:00
abraunegg e8406b719e Reinstate safeRename for online item moves
Reinstate safeRename for online item moves
2024-01-17 09:46:36 +11:00
abraunegg c328b029c5 Fix debug output
* Fix debug output
2024-01-17 09:04:42 +11:00
abraunegg b1a07a25f5 Update sync.d
* If timestamp needs to be corrected, return false so that the correct actions can be taken
* If in a --download-only scenario, do not update the timestamp online
2024-01-17 08:53:50 +11:00
abraunegg cda8317ef3 Fix that --dry-run prevents authorization
Fix that --dry-run prevents authorization
2024-01-16 06:11:16 +11:00
abraunegg c5f2ec4622 Update sync.d
Fix reported bug where the online date is being changed in download-only mode
2024-01-16 05:19:25 +11:00
abraunegg a5be48dea9 Update curlEngine.d
Update comment for libcurl forbid_reuse
2024-01-14 12:00:18 +11:00
abraunegg 67a2b4bed4 Update config.d
* Ensure that we load the 'skip_file' defaults when attempting to compare any configuration file entry changes
2024-01-14 08:05:26 +11:00
abraunegg 635102e8af Perform DB scan earlier and reuse result
* Remove potentially redundant applicability check of a path if this is already in the database. This is a manual merge of #2525
2024-01-14 07:17:25 +11:00
abraunegg 5dee97700e If requesting --help, dont attempt to load any 'config' file
* If requesting --help, dont attempt to load any 'config' file
2024-01-14 06:54:15 +11:00
abraunegg aab6c87d69 Malformed config line handling
Malformed config line should cause the application to exit. This then prevents malformed lines which might be valid configuration items, from not being read in, thus, causing incorrect application function based on expectations.
2024-01-13 18:08:55 +11:00
abraunegg 0ce088f0e2 Update 'root:' removal for 'skip_dir' path checking
* Update 'root:' removal for 'skip_dir' path checking
2024-01-13 16:03:43 +11:00
abraunegg d20b62da57 Fix 'config' file parsing and option handling
Fix that 'config' does not load when a deprecated option is at the beginning of the config file
2024-01-13 07:46:47 +11:00
abraunegg b5988f7aff Update curlEngine.d
* Re-introduce CURLOPT_FORBID_REUSE setting from 'alpha-2'
2024-01-12 11:44:57 +11:00
abraunegg a089b85bff Update config.d
Implement refactored and optimised applicationChangeWhereResyncRequired() function
2024-01-12 11:21:45 +11:00
abraunegg 3e86fe4f2a Update config.d
* Add logging output for what IP protocol is going to be used to access Microsoft OneDrive
2024-01-12 06:05:28 +11:00
abraunegg 9396478caa Update monitor.d
* Update inotify event handling where files might be temporarily moved by applications. This scenario is common with certain text editors (like Vim with specific configurations), which can lead to misleading file deletion detections.
2024-01-12 06:01:42 +11:00
abraunegg e4a6d62072 Update sync.d
* Cleanup array memory before we start adding files
2024-01-11 20:52:41 +11:00