Commit graph

395 commits

Author SHA1 Message Date
abraunegg 7cf2912d2d
Rework directory layout and refactor MD files for readability (#523)
* Move lots of stuff into contrib directory to clean up root folder
* Update autoconf files for new location of some files
* Refactor README split and move to docs directory
* Update INSTALL.md
* Update Makefile.in
* Install docs from new location
* Uninstall docs correctly
* Update Dockerfile
* Fix up Dockerfile spacing
* Move systemd stuff to contrib
* Move docker specific stuff to contrib/docker, update docs
* Fix Alpine and Stretch docker files
* Update configure after changed file locations
* Update INSTALL.md to include pkg-config as requirement
* Move also entrypoint.sh to contrib/docker
* Update 'min-notif-changes' to 'min-notify-changes' which was missed in PR #467
* Update to add --sync-root-files to usage.md and man page
* Update usage.md to include --auth-files ARG details
2019-06-11 18:40:05 +10:00
Norbert Preining aa2e2245f0 Support file based authorization (Issue: #524) (#525)
* support file based authorization
* remove generated files after authentication
2019-06-11 17:12:36 +10:00
luukvbaal ef6af8e5bc implement skip_size (Issue #213) (#517)
* Implement skip_size feature request (@luukvbaal)
2019-06-08 06:37:41 +10:00
abraunegg c617185c14
Update missing cTag patch (Issue #512) (#515)
* Update original patch to check for eTag in response to use, if not found set to empty value.
* Add cTag response validation for all cTag response use 'in-case' the cTag response is dropped from other responses
2019-06-03 10:43:16 +10:00
abraunegg 8d4a35e34d
Handle OneDrive API response when cTag key is missing (Issue #512) (#513)
* Handle response from OneDrive where cTag JSON elements are missing when uploading a locally modified file
* Update bug_report.md to fix up spelling errors
2019-05-30 12:41:26 +10:00
abraunegg bac9ab41ae
Enhance error message for curl CA SSL issue (Issue #507) (#508)
* Enhance error message when unable to connect to Microsoft OneDrive service when the CA SSL certificate has issues
2019-05-24 19:17:08 +10:00
abraunegg 239085f1fc
Check timestamp to ensure that latest timestamp is used when comparing OneDrive changes (Issue #505) (#506)
* If OneDrive presents a change to download and the file already exists, check the local modified timestamp to ensure that the local file is not technically newer than the file we are going to download
2019-05-23 05:38:32 +10:00
abraunegg 20eda60fdf
Catch a curl timeout exception (#499)
* Catch a curl timeout exception
* If we hit a curl exception, log that we hit this, as the handling of the exception in 'some' instances may actually not log an error as to 'why'
2019-05-13 09:10:19 -04:00
abraunegg f779881ff9
Check to ensure that file downloaded and is present locally before setting times (Issue #496)
* Check to see if the file was actually downloaded before attempting to set the times on the file.
* If file is not local, download failed
2019-05-13 08:22:15 -04:00
abraunegg 3e35e20cc5
Update sync.d (#493)
* Add an encoding validation check before any path length checks are performed as if the path contains any invalid UTF-8 sequences, the path walk to establish valid path length will fail
2019-05-13 07:52:49 -04:00
abraunegg caec1cb8cb
Implement --sync-root-files when using a sync_list file (Issue #491) (#492)
* Implement --sync-root-files to sync all files in the OneDrive root when using a sync_list file that would normally exclude these files from being synced
2019-05-09 21:18:49 +10:00
abraunegg bac5d6f1a9
Fix dry run reports "Deleting item from one drive" for remotely created file (Issue #489) (#490)
* Fix --dry-run logging output for faking downloading new files
2019-05-09 19:52:39 +10:00
abraunegg af43b77100
Better handling for initialisation errors (Issue #483) (#484)
* Better handle initialisation issues when OneDrive / MS Graph is experiencing problems that generate 401 & 5xx error codes
2019-05-05 21:06:55 +10:00
abraunegg fbad4b4835
Fix 'Local files not deleted' when using bad 'skip_file' entry (#480)
* Add a check for bad 'skip_file' entry that prevents incorrect searching of local changes (mainly deletes) from being synced
2019-04-25 11:00:23 +10:00
abraunegg ea26e4d830
Add logging as to why resume upload failed (Issue #468) (#470)
* Log 'why' the resume upload failed
* Remove the 'resume_upload' as it is invalid & contains bad data
2019-04-15 10:56:11 +10:00
abraunegg c6923cdf29
Update 'resume_upload' handling in the event of bad OneDrive response (Issue #468) (#469)
* Add JSON response checks in the event OneDrive sends malformed data
2019-04-15 08:10:48 +10:00
abraunegg 25d2f7284f
Update 'min_notif_changes' to 'min_notify_changes' (#467)
* Update 'min_notif_changes' to 'min_notify_changes'
2019-04-15 06:28:32 +10:00
abraunegg 521cf33001
Add 'quota' check for valid value (#466)
* If the 'quota' details are not provided when querying the OneDrive account details, we cannot set 'remainingFreeSpace' Add a flag that if this is 0 or negative, ignore validating if there is enough free space to upload a file and just upload blindly
2019-04-13 08:59:03 +10:00
abraunegg a2889098e9
Handle object error response from OneDrive (Issue #464) (#465)
* Add specific check to ensure that variable is of type object
* Add error logging to indicate error response from OneDrive was received
* Update error logging in saveItem to match
* Add a '401 Unauthorized' event handler when querying OneDrive if the file exists
2019-04-13 08:31:54 +10:00
Norbert Preining ea22d8fef5 config options for command line switches (#449)
* config options for command line switches to allow for better config handling in docker containers
2019-04-11 12:26:20 +10:00
abraunegg f12bcfb650
Add debugging for --get-O365-drive-id (#462)
* Add debugging for --get-O365-drive-id
2019-04-10 20:26:21 +10:00
abraunegg 92d2f14f15
Update 'root' item identification handling (#457)
* Add additional check to ensure item root we flag as 'root' is not just name checked as 'root'
2019-04-09 05:05:47 +10:00
abraunegg ea2e4a98bf
Add --upload-only check for sharepoint fix (Issue #452) (#453)
* Add a check for --upload-only use when trying to work around https://github.com/OneDrive/onedrive-api-docs/issues/935
* Update logging and print a warning message that the files are now technically different due to sharepoint bug and using --upload-only
2019-04-06 12:44:51 +11:00
abraunegg 7c2b3e853d
Implement more meaningful 5xx error responses (Issue #445) (#451)
* Issue #445 and https://github.com/OneDrive/onedrive-api-docs/issues/1035 highlight that the current 5xx error messages are too generic and need to be more specific. This patch makes those error messages more specific to the response code from OneDrive API
2019-04-04 17:13:15 +11:00
abraunegg 6a6b8f128f
Issue #432 and #441 combined (#447)
* Re-add original #432 and #441 fixes to master
2019-04-02 05:21:02 +11:00
abraunegg abb82868e4
Roll back to v2.3.1 (#446)
* Roll back to v2.3.1 after bad re-base merge with PR #389
2019-04-02 04:51:25 +11:00
abraunegg f38b13dd00
Resolve file creation loop when working directly in the synced folder with libreoffice (#442)
* Add debug line for flagging to disable upload validation checks
* Handle Microsoft 'enrichment' of certain documents when stored on Sharepoint
* Handle skip_dir checks when nothing to check against (false positive)
* Update default 'skip_file' to include tmp and lock files generated by LibreOffice
* Update code comments & logging output
* Update readme & default config file
* Update database version due to changing defaults of 'skip_file' which will force a rebuild and use of new skip_file default regex
2019-04-02 04:00:22 +11:00
abraunegg 4444b9cd8a
Reduce scanning of local filesystem needlessly every sync in monitor mode (#433)
* Reduce scanning the entire local system in monitor mode for local changes
* Add 'monitor_fullscan_frequency' to set the frequency of performing a full disk scan when in monitor mode
2019-04-02 03:58:56 +11:00
Norbert Preining b7cc540c2c fixes to the merge routine 2019-03-25 10:25:10 +09:00
Norbert Preining a433b44b56 Merge branch 'master' into norbert/config-options 2019-03-25 09:41:27 +09:00
abraunegg 79cc599057
Resolve high CPU usage when performing DB reads (#419)
* Disable automatic indexing as we specifically create the required indexes
* Tell SQLite to store temporary tables in memory. This will speed up many read operations that rely on temporary tables, indices, and views.
* Add links & reasoning behind other PRAGMA settings used
* Add new index specifically for driveId & parentId paring
* To force DB schema & index creation, bump DB schema version
* Update handling of skip_dir and skip_file parsing - should only check if the file is excluded if the parent directory is not
* Add another index for selectByPath database queries
* Add new build option to get more DEBUG symbolic information
* Use boolean values rather than on / off values
* Enable auto_vacuum for entry deletes / database cleanup
2019-03-24 11:12:40 +11:00
abraunegg 002f9b7aec
Prevent use of --synchronize & --monitor together (#431)
* Prevent use of --synchronize & --monitor together
2019-03-23 10:20:27 +11:00
abraunegg f5c3e7643d
Update 'skip_dir' handling to check against OneDrive new downloads (#427)
* Add check for directories to match skip_dir entries for OneDrive objects to download
* Update logging as to why a OneDrive object was skipped
2019-03-22 15:21:59 +11:00
Norbert Preining 8f28daec8a ignore a path containing multiple dirs in skip_dir 2019-03-22 12:05:30 +09:00
abraunegg de98fe8492
Fix JSONValue is not an object crash when a 5xx error is returned when uploading files (#426)
* Fix JSONValue is not an object crash when a 5xx error is returned when uploading files
2019-03-22 10:23:21 +11:00
abraunegg f2e007a1d7
Update skip_dir config handling (#418)
* Original skip_dir handling expected an explicit match to path to match. With this patch, wildcard matching for any directory matching the path entry will be skipped
2019-03-22 05:30:32 +11:00
abraunegg 6b8b51a7cc
Update sync.d (#422)
* Add a check to validate if 'size' is in the JSON response
2019-03-21 10:29:04 +11:00
Norbert Preining 3aff2e8251 move verbose check to first getopt to make it available early on 2019-03-17 13:10:41 +09:00
Norbert Preining ab918dd82d config directory management fixes 2019-03-17 12:41:26 +09:00
Norbert Preining 362bf35688 Merge branch 'master' into norbert/config-options 2019-03-17 12:25:27 +09:00
abraunegg 99c0267c7a
Implement 'skip_dir' config option (Issue #123) (#388)
* Implement config option 'skip_dir'
2019-03-15 06:55:05 +11:00
abraunegg ac7789df14
Update error logging around directory case-insensitive match (#412)
* Update error logging around directory case-insensitive match
2019-03-14 05:44:43 +11:00
abraunegg 4c3b959bf6
Resolve unhandled application crash when invalid auth response is used (Issue #399) (#410)
* Add a http 400 response error handler
* If the response uri generates a 400 error, the JSON response will not contain the access_token. Request to re-authenticate
2019-03-12 11:50:21 +11:00
abraunegg e849eb3de4
Resolve Key not found: nextExpectedRanges (Issue #408) (#409)
* Dont 'assume' that the key value pairs exist. Check if they do before attempting to use them
2019-03-12 11:49:15 +11:00
abraunegg 98624267c5
Implement --dry-run (#337)
* Implement new feature --dry-run
2019-03-11 17:57:47 +11:00
abraunegg 3f08e271af
Update util.d - reduce local FS read overheads (#407)
* Try and read 1 byte of the file rather than 10MB for each 'new' file to be uploaded to validate local file permissions
2019-03-11 17:56:26 +11:00
abraunegg efaaaadce2
Rework function uploadCreateDir (#397)
* Ensure that on query failure, default root and drive id is used
2019-03-08 08:40:29 +11:00
abraunegg ba834368ca
Implement --check-for-nosync to ignore folder when special file present (Issue #163) (#390)
* Implement a capability to ignore a folder when a special file (.nosync) is present
2019-03-03 05:58:36 +11:00
Norbert Preining e5b500a041 remove unnecessary code, cleanup 2019-02-27 08:57:04 +09:00
Norbert Preining 388a3bb102 Merge branch 'master' into norbert/config-options 2019-02-27 08:51:28 +09:00