Commit graph

728 commits

Author SHA1 Message Date
abraunegg ba94b92d8a
Improve application startup when using --monitor when there is no network connection to the OneDrive API (#1188)
* Improve application startup when using --monitor when there is no network connection to the OneDrive API
* Retry network connection test when using --monitor
* Only initialise application if OneDrive API is reachable
2020-12-18 06:17:52 +11:00
abraunegg 9b44bb1e96
Fix crash when unable to read a local file due to file permissions (Issue #1178) (#1179)
* Test if local file is readable based on user permissions before attempting to access file to determine the sync state or upload
2020-12-12 05:58:07 +11:00
abraunegg 5349340818
Add debug log output for configured API URL's (#1177)
* Add to debug log output the configured URL's which will be used throughout the application to remove any ambiguity as to using incorrect URL's when making API calls.
2020-12-10 11:18:13 +11:00
abraunegg 3b18638a63
Remove duplicate code for error output functions and enhance error logging output (#1170)
* Remove duplicate code for error output functions and enhance error logging output
2020-12-09 14:18:16 +11:00
abraunegg 335eab326d
Handle case where API provided deltaLink generates a further API error (#1175)
* Handle case where API provided deltaLink generates a further API error. Refer to: https://github.com/OneDrive/onedrive-api-docs/issues/1408
2020-12-09 14:03:49 +11:00
abraunegg 88f78c163f
Fix application crash in --monitor mode due to 'Failed to stat file' when setgid is used on a directory (#1157)
* Add debugging output when adding paths and items to an inotify watch
* Only if a path is a directory, perform a path walk
* Catch Exception as error when permissions cause access exception
2020-11-26 06:35:20 +11:00
abraunegg 48fc64a247
Check application_id before setting redirect URL when using specific Azure endpoints (#1165)
* If using specific AD endpoints, but using the default application ID, the redirect URL does not match. Check if the application_id before setting the redirect URL.
2020-11-26 05:51:29 +11:00
abraunegg a4a5a5f267
Fix logging output when authentication authorisation fails (#1156)
* If OneDrive generates an auth error, dont log that the auth was sucessful
2020-11-21 06:46:05 +11:00
abraunegg ac4da2e2ba
Update #1142 logging output handling (#1153)
* Update logging output to debug rather than standard log
2020-11-20 06:33:47 +11:00
abraunegg 8c23efc6c5
Fix changing permissions on pre-existing local directories (#1152)
* When attempting to create local directories, test to determine if they exist locally first before creating & setting file system permissions
2020-11-20 05:36:20 +11:00
abraunegg 17d5f97cb0
Merge branch 'master' into fix-issue-1137 2020-11-14 06:21:03 +11:00
abraunegg 550ab4b6dd
Use config set option for 'remove_source_files' and 'skip_dir_strict_match' rather than ignore (#1142)
* Remove items from direct config string update, as they are configurable via config file, thus set option via config file is not used
* Add debugging and application config output for used options
2020-11-14 06:17:53 +11:00
abraunegg aa533ef5a4 Update sync.d
* tweak skip message output
2020-11-13 09:52:48 +11:00
abraunegg b59596523e Update sync.d
* Full fix
2020-11-13 08:27:09 +11:00
abraunegg b57bb3fde5 Update sync.d
* Remove this
2020-11-13 08:02:28 +11:00
abraunegg dd989b73d1 Update sync.d
* Flag that this download failed
2020-11-13 07:48:14 +11:00
abraunegg ac02b768d3 catch folder creation errors due to file system permissions error
* catch folder creation errors due to file system permissions error
2020-11-13 07:34:52 +11:00
abraunegg cc2b8085f5 Update error catching and handling
* Update error catching and handling
2020-11-13 05:42:24 +11:00
abraunegg 68cc51ab4d Update onedrive.d
* Remove try block - incompatible with auto designation needed to open file ...
2020-11-12 21:51:07 +11:00
abraunegg aa47f1119f Fix download failure due to incorrect filesystem permissions
* Add try block for opening new file for writing when downloading a new file to catch any read only file systems
* Move set file attributes to master function, incase there is a download failure, exit scope cannot set attributes on a file that is non existent
2020-11-12 21:35:06 +11:00
abraunegg 2c80033c89
Correctly set config directory permissions at first start (#1132)
* When ~/.config/onedrive/ gets created for the first time, directory permissions are not set, thus, effective permissions of 'd---------' get applied. This then causes issues attempting to update the 'refresh_token' as permission is denied.
* When permission is denied, the file exception error is not correctly handled
* Set refresh_token file permissions
2020-11-09 08:06:48 +11:00
mp1994 7a4abfff40
Check if localModifiedTime >= item.mtime: avoid re-upload (#1131)
* Check if localModifiedTime is >= than item.mtime: avoid re-upload for equal modified time

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2020-11-08 08:44:57 +11:00
abraunegg 57d6753f80
Merge contents of SQLite WAL file into main database file on sync completion (#1128)
* When using WAL and SHM files, certain thresholds are used to automatically determine when WAL and SHM data is committed to the main database file. If these thresholds are not met, the data is not written. Before terminating the program, commit the data, and at the end of each monitor loop, commit the data
* Only try and write data to DB file and destroy variable if it was set to begin with
* Only try and destroy 'onedrive' variable if set, rather than set to null
2020-11-06 10:28:15 +11:00
abraunegg d2193c97f5
Fix uploading data to shared business folders when using --upload-only (#1127)
* Handle uploading new data to a OneDrive Shared Business Folder when using --upload-only and if the shared folder has never been synced before
2020-11-05 05:19:39 +11:00
abraunegg b4c3da6e10
Check the given local path in reverse order for a skip_dir match on --resync (#1125)
* When matching skip_dir entries, if there is no direct first match, perform a reverse directory walk to test each path block for a match
2020-11-05 04:51:35 +11:00
abraunegg 363f64df36
Check for the presence of .nosync when processing DB entries (#1124)
* Add check for .nosync if enabled for directory database objects as these might also be relevant mount points which have 'gone' away
2020-11-04 07:28:40 +11:00
abraunegg 106e114929
Update --list-shared-folders to only show folders (#1114)
* Update --list-shared-folders to only show folders
2020-11-01 10:06:08 +11:00
abraunegg b365ec6322
Cleanup dryrun shm and wal files if they exist (#1121)
* Cleanup dryrun shm and wal files if they exist
2020-11-01 06:55:17 +11:00
abraunegg cf4ee5017f
Configure specific File and Folder Permissions (#1108)
* Configure specific File and Folder Permissions, defaults for new items downloaded from OneDrive:
Directories: 700
Files: 600
2020-10-30 08:00:26 +11:00
abraunegg fe86dd1809
Fix Business Shared Folder handling to process only Business Shared Folders (#1104)
* Update Business Shared Folder handling to process only Shared Folders, not individually shared files
2020-10-26 17:23:24 +11:00
abraunegg 9f60b95eed
Fix logging output for modification comparison source (#1103)
* Fix logging output for modification comparison source
2020-10-23 06:36:14 +11:00
sebastiaopf a3c4ba1b3b
Adding support for authentication w/ single tenant custom applications (#1094)
* Adding support for authentication with single tenant custom applications in OneDrive Business/Enterprise accounts.

When using a custom single tenant application the /common/ part on the authentication URLs needs to be replaced
by the tenant name. This can be configured on the azure_tenant_id setting, but this entry was being ignored unless
a custom azure_ad_endpoint was also set.

* Updated documentation to mention that, when configuring for Single Tenant Applications,
both the Tenant Name and Application ID must be included on the config file.

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2020-10-10 15:39:04 +11:00
abraunegg b4328db2ef
Update debugging output for /delta changes available queries (#1089)
* Update debugging output for /delta changes available queries
2020-10-07 09:33:00 +11:00
themoox 2f35a33f4f
Allow config to specify a tenant id for non-multi-tenant applications (#1085)
* Allow config to specify a tenant id for non-multi-tenant applications
* Add instructions on how to find your O365 tenant identifier for National Cloud deployments.

Co-authored-by: Ryan Brown <ryan.brown@avarint.com>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2020-10-06 08:06:04 +11:00
abraunegg e4d7821026
Handle deletion events for directories when inotify events are missing (#1082)
* Handle the missing inotify events for deleted items as a deletion event when running in --monitor
2020-10-03 09:21:56 +10:00
abraunegg e44e6b4233
Fix uninitialised value error as reported by valgrind (#1075)
* Fix uninitialised value error as reported by valgrind
2020-09-25 12:55:21 +10:00
abraunegg 7684c74600
Handle deletion events when inotify events are missing (#1073)
* Handle the missing inotify events for deleted items as a deletion event when running in --monitor
2020-09-25 08:22:37 +10:00
abraunegg 3604dc6984
Add notification to advise users when the client needs to be reauthenticated (#1046)
* Utilise errorAndNotify function to advise users when the client needs to be reauthenticated
2020-09-25 06:42:44 +10:00
abraunegg 19cf656c19
Implement Feature: Multiple skip_dir & skip_file configuration rules (#1068)
* Implement Feature: Multiple skip_dir & skip_file configuration rules
2020-09-19 07:51:49 +10:00
abraunegg 4809f91655
Implement Feature: Support negative patterns in sync_list for fine grained exclusions (#1065)
* Support negative patterns in sync_list where a new line is matched in a negative manner to be excluded is prepended with a '!' or '-' character to exclude an otherwise included path
2020-09-19 06:59:19 +10:00
abraunegg 1364f36aba
Support wildcard within sync_list entries (#1063)
* Support wildcard within sync_list entries
* Update usage documentation
2020-09-16 17:03:00 +10:00
abraunegg 0c770efa96
Implement Feature: Create shareable link (#1061)
* Implement feature request to create a shareable file link. Default is to create a read-only anonymous link

Co-authored-by: Norbert Preining <norbert@preining.info>
2020-09-14 17:49:50 +10:00
abraunegg 05fc734440
Handle removing child items on OneDrive when parent item responds with access denied (Issue #1041) (#1045)
* Handle removing child items on OneDrive when parent item responds with access denied due to parent folder permissions issue.
2020-09-02 06:23:41 +10:00
abraunegg fa3eb8bc1a
Remove 'Icon' check as no longer valid (#1038)
* Remove 'Icon' check as no longer listed as an invalid file or folder names in OneDrive API documentation
2020-08-28 06:18:56 +10:00
abraunegg 431678753d
Update --single-directory path handling when path does not exist locally (#1031)
* If the requested path for --single-directory does not exist locally, create it rather than display error and exit
2020-08-21 07:06:56 +10:00
abraunegg 2099ec2994
Flag when remaining free space is being restricted (#1029)
* In certain scenarios quota details are restricted, thus, remaining free space tracking is not possible. Flag this is the case rather than report a zero value.
2020-08-20 10:52:46 +10:00
abraunegg 880631982c
Update --single-directory handling of parent path matching (#1014)
* In certain scenarios when using --single-directory (either very first run or with --resync) the parent path for the selected path will not be in the database, thus, all items that should be synced are not. Add another special case handler to handle this scenario.
2020-08-09 15:48:27 +10:00
abraunegg 5907d9eb0a
Update how available free space is tracked when uploading files to OneDrive (#1011)
* Update how available free space is tracked when uploading files to OneDrive and Shared Folders
2020-08-08 08:56:00 +10:00
abraunegg 786446f79b
Fix 'Skipping uploading this new file as parent path is not in the database' when uploading to a Personal Shared Folder (#1009)
* Fix 'Skipping uploading this new file as parent path is not in the database' when uploading to a Personal Shared Folder
* When syncing OneDrive Personal Shared Folders, add the driveId to the driveIdArray
* Rename function to be more representative of what function does
2020-08-06 17:45:10 +10:00
abraunegg 2fe0574bcf
Update Office365 / SharePoint site search query (#1006)
* Update Office 365 / SharePoint site search query and response if query return zero match
2020-08-04 11:03:52 +10:00
abraunegg 928ad9512f
Check shared folder DB entries for matching skip_dir items (#1003)
* Check shared folder DB entries for matching skip_dir items
2020-07-28 07:00:34 +10:00
abraunegg 76ce1036a4
Update when 'Sync with OneDrive is ..' is outputted when in --monitor mode (#999)
* The original intention here was that 'Sync with OneDrive is ...' is outputted when the sync starts / ends in 'verbose' mode, and not added to when not using any 'verbose'. What is occurring is, this is being added when MONITOR_LOG_QUIET threshold is met, which was not the intention. This now fixes when this message is outputted so that it is more reflective of when a sync is being done, when in --monitor mode
2020-07-22 15:56:20 +10:00
abraunegg beb737e903
Fix segfault when moving file when using --monitor (#997)
* Fix segfault when attempting to perform a comparison on an inotify event when determining if event path is directory or file
2020-07-22 06:54:35 +10:00
Mateusz P-K f6002311cd
Improve --single-directory sync performance (#992)
* Remove erroneous 'return' statement which could prematurely end processing all changes returned from OneDrive
* Improve --single-directory sync performance

This commit modifies code inside applyDifferences function,
the part responsible for deleting changes/moving them out
of the selected sync directories. This change makes an HTTP
request responsible for checking whether a changed item still
exists on OneDrive only be sent only if it may in fact influence
whether an item will be deleted from the synced folder or not
or just discarded.

This makes an enormous performance boost, because it limits
redundant HTTP requests that ask about changed items that will
be discarded or not.

Signed-off-by: Mateusz P-K <mateusz.kaplon@gmail.com>
2020-07-21 15:19:41 +10:00
abraunegg 25fd9a1b00
Update the 'Processing XXXX' output to display the full path (#987)
* Update the 'Processing XXXX' output to display the full path, rather than just the item name from the database. In cases where you have the same file or directory name, having the full path where it is present is more informative
2020-07-07 19:51:05 +10:00
abraunegg 810c47fcfe
Increase maximum file size to 100GB (#989)
* In July 2020, Microsoft increased the maximum file size for uploads from 15GB / 20GB for Personal / Business Accounts to 100GB per file for all account types
2020-07-07 19:19:50 +10:00
abraunegg 8c0d43183d
Resolve client 'hang' when attempting to sync a Unix pipe file (#985)
* Resolve client 'hang' when attempting to sync a unix pipe file
2020-07-07 18:05:36 +10:00
abraunegg 48292a0858
Update 'skip_dir' and 'skip_file' pattern matching and handling for --monitor (#986)
* Update 'skip_dir' and 'skip_file' pattern matching and handling for --monitor
2020-07-07 17:39:09 +10:00
abraunegg e23e06305a
Update 'skip_dir' and 'skip_file' pattern matching and handling (Issue #982) (#983)
* Update 'skip_dir' and 'skip_file' pattern matching and handling
2020-07-07 05:17:03 +10:00
abraunegg 41d92ddab5
Process OneDrive Personal Shared Folders only if account type is 'personal' (#972)
* Update code to ensure that OneDrive Shared Folders are processed, only if account type is 'personal'
2020-06-28 10:57:21 +10:00
abraunegg 9cc72c2396
Implement OneDrive Business Shared Folders Support (Issue #459) (#473)
* Implement OneDrive Business Shared Folders Support
2020-06-27 19:10:37 +10:00
abraunegg 650cb97d3f
Simplify code for readability (#961)
* Remove buildNormalizedPath complexity and simplify code
2020-06-21 10:01:24 +10:00
abraunegg d8bfe846c2
Update documentation for --upload-only & --download-only to avoid ambiguity (#960)
* Update wording on --upload-only , --download-only to avoid ambiguity
* Update --upload-only usage example to include --no-remote-delete
2020-06-21 08:09:06 +10:00
abraunegg 93163051f5
Support comments in sync_list file (#958)
* If sync_list contains a comment line, exclude this from sync_list processing
2020-06-20 19:13:46 +10:00
abraunegg 1c10effb9b
Implement support for National cloud deployments (Issue #937) (#938)
* Implement support for National cloud deployments as per https://docs.microsoft.com/en-us/graph/deployments
2020-06-17 07:57:14 +10:00
Christian Ponte-Fernández 3b85d574e0
Implement recursive deletion when Retention Policy is enabled (#955)
* Implement recursive deletion when Retention Policy is enabled
2020-06-17 06:49:43 +10:00
Christian Ponte-Fernández 9e020f05cc
Fix segfault when moving folder outside the sync directory when using --monitor (#957)
Fix segfault when moving folder outside the sync directory when using --monitor on Arch Linux
2020-06-17 06:28:55 +10:00
abraunegg e321c373fd
Handle a 'race' condition to process inotify events (#948)
* Handle a 'race' condition to process inotify events generated whilst performing DB or filesystem walk
2020-06-12 06:46:59 +10:00
Liran 46c91bac6e
Added support for loading system configs if there's no user config. (#914)
* Added support for loading system configs if there's no user config file supplied. Uses application defaults if corrupt.
* Update documentation to indicate where config files can be stored & read from
2020-06-05 14:49:31 +10:00
abraunegg 203da2dfb8
Perform initial sync at startup in monitor mode (#946)
* If starting the application up, dont wait for monitor_interval to elapse before first sync attempt
2020-06-05 06:49:23 +10:00
abraunegg df361b261b
Update message output for performFullItemScan or oneDriveFullScanTrigger (#945)
* Update message output depending on if performFullItemScan or oneDriveFullScanTrigger was set
2020-06-05 06:45:19 +10:00
abraunegg b7f69e2541
Update logfile output spacing (#944)
* Update logfile output spacing
2020-06-05 06:00:42 +10:00
abraunegg 8376a360cc
Check if symbolic link is relative to location path (#942)
* If a symbolic link is 'relative', it is relative to the path where the symbolic link exists, not the current working directory. Test if the failed symbolic link read is due to the link being relative, and advise accordingly.
2020-06-02 13:46:57 +10:00
abraunegg d33443cb4f
Add inotify event debugging (#941)
* Add inotify event debugging
2020-05-29 19:30:03 +10:00
abraunegg f0c5ca95c6
Update logging output of skipped files (#932)
* Normalise output when specifying a particular file which is being skipped
2020-05-26 19:53:35 +10:00
abraunegg aee2052f1e
Strengthen data preservation checks & update how bypass preservation is set (#931)
* Strengthen bypass data preservation variable checks
* If a file is modified locally, and '--resync' is used, there is no way to tell if this file is a failed download or 'valid' thus potentially lead to a data loss scenario. In this case, and ONLY if --resync was issued, rename the local file for data preservation
2020-05-26 17:04:22 +10:00
abraunegg f9c3ccc311
Add developer option to display sync options (#924)
* It may be desirable to see what options are being passed in to performSync() without enabling the full verbose debug logging. This has been useful when tracking down 'sync_list' / sync issue & other performance related items without having to enable full verbose debugging to see what is going on
2020-05-25 11:30:04 +10:00
abraunegg 0096e7efce
Add file validation for moved / renamed files (#929)
* When renaming a file locally, ensure that the target filename is valid before attempting to upload to OneDrive
2020-05-25 10:51:57 +10:00
abraunegg b9dd8c754d
Add debugging output for retry wait time (#928)
* Add debugging output for retry wait time
2020-05-24 17:39:28 +10:00
abraunegg cd07414e7b
Change monitor interval default to 300 seconds (#923)
* Having a 45 second default between monitor sync loops is too short. If there are a large number of files on the system (30K+) local file integrity checks take longer than 1 minute to complete, thus, it will seem like the system is 'forever' processing. Changing this to 300 seconds between sync loops is a more sane default.
2020-05-21 11:08:07 +10:00
abraunegg fc90ccb425
Implement 'bypass_data_preservation' enhancement (Issue #824) (#831)
* On some Linux distributions, the file system search tool locally modifies certain files after indexing. Even though the file contents has not changed, the file itself has, as the local modified timestamp has been updated. This then causes timestamp checks to be invalid. To ignore this in cases where this is occurring, configure 'bypass_data_preservation' to 'true' in the config file and local data protection rules will be ignored.
* Add warning to application startup if 'bypass_data_preservation' has been enabled
2020-05-21 06:48:02 +10:00
abraunegg 060a42ab77
Remove double scan of OneDrive when using --monitor --resync at application startup (#920)
* Remove double scan of OneDrive when using --monitor --resync at application startup
2020-05-20 13:15:43 +10:00
abraunegg 206ab8f516
Resolve issues identified by Valgrind (#910)
* Resolve issues identified by 'valgrind' where possible
2020-05-20 11:37:11 +10:00
abraunegg 9933d459ed
Check if configuration file exists before trying to load it (#909)
* Check if configuration file exists before trying to load it
2020-05-20 11:31:30 +10:00
abraunegg 2f22d38cb0
Fix module std.digest.digest is deprecated (#916)
* Fix module std.digest.digest as this is deprecated when using DMD 2.092 and above
2020-05-12 10:50:36 +10:00
abraunegg 2529b99265
Update enforce statement for parent id database query (Issue #912) (#913)
* Update database enforce check with conditional check on parent drive ID. If the parent is a shared folder, the parent ID will never be in the database as we are never provided that parent ID.
2020-05-10 05:42:46 +10:00
abraunegg cb06395a46
Catch unhandled MonitorException when inotify throws an error (Issue #903) (#905)
* Catch uphandled MonitorException when inotify throws an error
* Change monitor loop init full scan to false at start as fullScanOverride now correctly handled, negating need to true-up at application start
* Handle '100 Continue' response during upload
* Update handling of delta link being expired
* Update progress bar handling for uploads as #888 changed bar dynamics
2020-05-06 07:20:13 +10:00
abraunegg eda3d3c4bb
Better handle out-of-space message (#907)
* Better handle out-of-space message when OneDrive is out of space
2020-05-05 15:04:59 +10:00
abraunegg dcc0322cac
Update how './' is stripped from a path before check if excluded (Issue #901) (#902)
* Update how './' is stripped from a path before check if excluded
2020-05-02 04:46:44 +10:00
abraunegg bc9f2cf893
Update handling of fullScanRequired and syncListConfiguredFullScanOverride (Issue #896) (#899)
* Change 'syncListConfigured' to 'syncListConfiguredFullScanOverride' as this is what this variable
* Update handling of fullScanRequired and syncListConfiguredFullScanOverride
* When a 429 or 504 is generated when querying for 'changes' inside a changeset bundle, dont restart scanning changes from the beginning, retry original request after a delay
2020-05-02 04:05:06 +10:00
abraunegg a61d291340
Update #658 & #865 handling as when to setOneDriveFullScanTrigger (Issue #896) (#898)
* Change output for debugging
* Update setOneDriveFullScanTrigger to only be used when sync_list or skip_dir is used
* Unset oneDriveFullScanTrigger when it is currently set and no longer needed
2020-04-28 10:56:44 +10:00
abraunegg 73f71f6d52
Fix assertion when attempting to compute complex path (Issue #890) (#891)
* Before attempting to compute the complex path, check if the parent details are in the database
* Handle --dry-run and --no-remote-delete for shared folders
2020-04-27 20:59:35 +10:00
abraunegg c05243444f
Update progress bar to be more accurate when downloading large files (#888)
* Change from round to floor, so % bar increases when downloaded data is at X% not potentially under, thus leading to under reporting
* Add debug output when each % increase when downloading a file to assist with validating progress
* Start displaying ETA starting at 5% rather than 10%
2020-04-26 06:52:29 +10:00
abraunegg 628c58ad58
Catch unhandled curl exception on operationTimeout being exceeded (#886)
* Catch unhandled curl exception on operationTimeout being exceeded
2020-04-23 10:25:41 +10:00
abraunegg ccbeae4942
Implement resync in config option (Issue #874) (#875)
* Implement the ability to set --resync as a config option, default is false
2020-04-20 13:03:36 +10:00
abraunegg 2a7e48b823
Differenciate between OneNote objects and other unsupported objects (#870)
* Differenciate between OneNote objects and other unsupported objects
2020-04-15 14:54:21 +10:00
abraunegg d3aa0032bc
Perform full scan of OneDrive when required to ensure consistent local state (Issue #865) (#867)
* Use the configured 'fullScanRequired' every 10th loop to ensure that the local repository actually is in sync with OneDrive when sync_list is not used
* Use 'oneDriveFullScanTrigger' if it is set to trigger a full scan earlier than wait for next full sync if in monitor mode
2020-04-15 14:29:50 +10:00
abraunegg 7ca1ff95a8
Update handling of folders that cannot be read if parent should be skipped (#866)
* If a directory cannot be accessed, and is in a folder that should be skipped, do not print warning
2020-04-15 14:07:58 +10:00
abraunegg 7a18393ed0
Update skip_dotfiles handling of .folders when in monitor mode (#848)
* Prevent monitoring files inside .folders when using skip_dotfiles in monitor mode
* Handle '.folder' -> 'folder' move when skip_dotfiles is enabled
2020-04-06 20:05:06 +10:00
abraunegg 31629e697f
Update error logging output to be consistent (#860)
* Update error logging to be consistent when initialising fails
* Update error logging output to handle HTML error response reasoning
2020-04-06 19:40:42 +10:00
abraunegg c41adda7a0
Handle zero-byte modified files for OneDrive Business (#854)
* OneDrive does not support the uploading of zero-byte files when uploading via the OneDrive Web UI, however it is possible to upload then via the API as a 'new file'. If a local zero-byte file is modified, upload this as a 'new file' rather than attempt to upload as a normal modified file.
2020-04-02 19:25:22 +11:00
abraunegg 9ae6f8e808
Handle .nosync directive when downloading new files (Issue #827) (#842)
* Handle .nosync directive when downloading new files to an existing directory that is (was) in sync
* Handle the situation where a .nosync is created after some sort of partial download, so that the file, whilst now unwanted, is not downloaded
2020-04-02 07:39:02 +11:00
abraunegg 0170884bd1
Update --single-directory handling for --dry-run and --resync (#856)
* Update --single-directory handling when using --dry-run
* Update --single-directory handling when using --resync and items to sync are in a child folder rather than root, leading to parent database issues (foreign key constraint)
2020-04-02 06:56:50 +11:00
abraunegg 50fb2d8bfa
Update application output when using --dry-run and --resync and database is corrupt (Issue#844) (#845)
* Update application output when database is corrupt and how to resolve by using --resync
* Handle --dry-run and --resync correctly - do not copy the database, it may be corrupt
* Always check if items-dryrun.sqlite3 still exists, remove it as it maybe corrupt when --dry-run is used
2020-03-30 06:55:27 +11:00
TheOnlyTrueJonathanHeard 3708828806
Handle renaming dotfiles to another dotfile when skip_dotfile=true in monitor mode (#843)
* Handle renaming dotfiles to another dotfile when skip_dotfile=true in monitor mode

With thanks to @TheOnlyTrueJonathanHeard
2020-03-29 07:08:01 +11:00
GeorgeKalovyrnas caf51886cf
Escape parentheses from path or file names (#841)
* Escape parentheses from path or file names, when doing comparison with regex

With thanks to @GeorgeKalovyrnas
2020-03-28 07:49:33 +11:00
TheOnlyTrueJonathanHeard 7170498a95
Handle renaming files to a name starting with a dot when skip_dotfile=true (#838)
* Handle renaming files to a name starting with a dot when skip_dotfiles = true

With thanks to @TheOnlyTrueJonathanHeard
2020-03-28 07:20:00 +11:00
abraunegg feb3d96a7e
Release files for 2.4.0 (#833)
* Release files for 2.4.0
2020-03-23 09:18:06 +11:00
abraunegg 6f85d539da
Update client identifier and auth scopes (Issue #769) (#770)
* Update the client identifier to 'd50ca740-c83f-4d1b-b616-12c519384f0c'
* Update User Agent identifier to comply with OneDrive traffic decoration requirements
* Provide 'config' file option to modify / update client identifier to override application default
2020-03-23 07:01:51 +11:00
abraunegg 896a4676f5
Update regex parsing of response URI (#830)
* Update regex that extracts the response code from the response URI to avoid potentially generating a bad request to OneDrive, leading to a 'AADSTS9002313: Invalid request. Request is malformed or invalid.' response. With thanks to @zfil for fix.
2020-03-21 07:20:19 +11:00
abraunegg edd365d21b
Update error response handling for catching HTTP 429 responses - activityLimitReached (Issue #815) (#816)
* Overhaul OneDrive error response handling for 429 errors by utilising the HTTP response header Retry-After to configure the correct 'retry' window. If no retry window is set, defaults to 120 seconds.
* Update error response messaging when a 429 response is received
* Update how the original OneDrive query is retried when a 429 response is received
* Update the User Agent string to be more compliant with OneDrive decoration requirements to assist in avoiding 429 responses due to incorrect User Agent string being used. Updated to: ISV|abraunegg|OneDrive_Client_for_Linux/v%version_tag%
2020-03-20 06:12:47 +11:00
abraunegg 1e8395fb73
Handle moving files into a skipped .folder when skip_dotfiles = true (#828)
* If skip_dotfiles = true, moving files into a skipped .folder should not throw an error and should be removed from their previous location on OneDrive
* Add log message to indicate why delete operation is occurring on item which was moved
2020-03-20 05:35:21 +11:00
abraunegg 4cb0ebbfde
Update logging output (Issue #818) (#819)
* Tighten up the logging output to better clarify what is occurring when sync_list is being used
2020-03-15 06:58:57 +11:00
abraunegg b1fcb814c3
Update application output when just authorising application (Issue #820) (#821)
* Update application output to be clearer when just authorising the application and --synchronize or --monitor not passed in
* Update usage.md with updated authorize details and example
2020-03-15 06:29:44 +11:00
abraunegg 1bb4ed765c
Always log when a file is skipped due to the item being invalid (Issue #811)
* If an item is to be skipped due to being 'invalid' log this without the requirement of --verbose
2020-03-06 09:20:47 +11:00
abraunegg a4d72fc73c
Catch when OneDrive throws an error response on initialising (Issue #802) (#804)
* Catch when OneDrive throws an error response (40x, 50x) on initialising
2020-03-02 12:54:56 +11:00
abraunegg 76b80e953e
Update file handling when a failed download has occured due to CTRL-C (#800)
* If CTRL-C is used when downloading a file, remnants of this file may still exist when next sync occurs. If the file is not present in the local cache database, redownload the file from OneDrive. Does not impact however if --local-first directive is being used.
2020-02-15 10:02:29 +11:00
abraunegg fc6e2d9cfe
Catch 429 HTTPS return code when query for oneDriveRootDetails fails (#796)
* Catch 429 HTTPS return code when query for oneDriveRootDetails fails & provide error feedback that this was the reason why application initialization failed
2020-02-12 06:16:38 +11:00
abraunegg 2321518faa
Update how the 'username' is determined from the running process for logfile naming (Issue #786) (#787)
* Fix an issue where the 'username' for the running process is not correctly determined on some platforms when enabling logging via --enable-logging
2020-02-03 09:10:57 +11:00
abraunegg 14cd47b56f
Implement #699 - Perform skip_dir explicit match only (#768)
* Implement #699 - Perform skip_dir explicit match only
2020-01-29 16:37:50 +11:00
abraunegg f2fe718389
Implement #763 - Delete local files after sync (#767)
* Implement #763 - Delete local files after sync
2020-01-27 08:42:00 +11:00
abraunegg 5c2ad041bd
Implement warning on big deletes to safeguard data on OneDrive (#621)
* When testing changes to onedrive client configuration, the new configuration might be invalid (see #458 for example) and you remove all your data on OneDrive accidentally. This new feature attempts to protect your data on OneDrive when performing large deletes, so that a large delete is detected and asks for confirmation before actually processing this request. This feature does not impact `--monitor` mode of operation, only standalone mode of operation.
2020-01-03 07:46:58 +11:00
abraunegg 8549719df3
Fix --dry-run output to be consistent when using --upload-only & --no-remote-delete (Issue #758)
* Fix --dry-run output when using --upload-only & --no-remote-delete and deleting local files
2019-12-30 10:17:10 +11:00
abraunegg 217d72486d
Change synclist override flag to false as default when not using sync_list (#745)
* Set 'syncListConfiguredOverride' to false by default, only set to true at start if sync_list is true
* Remove logAndNotify as it is excessive for each change bundle to inform the desktop
* Add a log entry when a monitor sync loop with OneDrive starts & completes
2019-12-17 05:32:38 +11:00
abraunegg 8ecd1989b4
Fix where an item now out of scope should be flagged for local delete (#733)
* Fix where an item now out of scope should be flagged for local delete
2019-11-23 11:20:58 +11:00
Norbert Preining 133c45e545 Catch DNS resolution error (#730)
* Catch the DNS error the same way we catch the timeout error
2019-11-23 06:43:28 +11:00
abraunegg db5ceccffb
Check database for excluded sync_list items previously in scope (Issue #723) (#724)
* When using sync_list and files are moved out of sync scope online via OneDrive website, check if the item was previously in-sync in database. if true, flag for local delete.
* Rework fix for #568 so that if a directory is moved / created in sync_list scope, on the 'true-up' sync, any files that were moved with the folder are now downloaded
* Update when sync_list override is done
* Add debugging for each loop for sync_list scan handling
2019-11-21 19:58:34 +11:00
abraunegg 387bd53438
Add debug message to when a message is sent to dbus or notification daemon (#728)
* Add debug message when message is sent to notify daemon
* Update usage document to detail how to enable non-root systemd usage + notifications
2019-11-21 18:59:45 +11:00
abraunegg 0445ae03d3
Update Microsoft restriction and limitations (#725)
* Update Microsoft restriction and limitations about windows naming files to include '~' for folder names
2019-11-14 11:53:07 +11:00
abraunegg c876b9c575
Retry session upload fragment when transient errors occur to prevent silent upload failure (#721)
* When uploading data to OneDrive via a session, and OneDrive throws an exception response, retry the fragment upload instead of silently failing without any error message
* Add error message & error logging when uploading data via a session and OneDrive throws an exception
2019-11-11 20:27:34 +11:00
abraunegg 7b4ba2e5d2
Only monitor top level single directory + its children if using --single-directory (Issue #709)
* If --single-directory is being used, and we are using --monitor, only set inotify watches on the single directory
2019-11-02 10:41:18 +11:00
Tudor Brindus 7ba59e0b1d Fix --monitor when used with --download-only (#708)
* Fix --monitor when used with --download-only. This fixes the regression introduced in 12947d160f.
2019-10-31 14:59:44 +11:00
abraunegg df3fba1be0
Catch a 412 response when moving files (Issue #706) (#707)
* Catch a 412 response when moving files right after upload.
2019-10-31 12:58:09 +11:00
abraunegg 12947d160f
Fix unhandled monitor initialisation exception (Issue #704) (#705)
* Catch MonitorException when initialisation failure occurs, print error and exit ... cant enter monitor loop if we cant initialise correctly.
* Cleanup and add documentation update
2019-10-30 17:46:02 +11:00
abraunegg 9b3179540f Revert "Fix unhandled monitor initialisation exception"
This reverts commit e1be2b1e55.
2019-10-30 06:33:11 +11:00
abraunegg e1be2b1e55 Fix unhandled monitor initialisation exception
* Catch MonitorException when initialisation failure occurs, print error and exit ... cant enter monitor loop if we cant initialise correctly.
2019-10-30 06:32:17 +11:00
abraunegg fec892b038
Fix call from --monitor to observe --no-remote-delete (#703)
* Fix call from --monitor to observe --no-remote-delete
2019-10-30 05:09:40 +11:00
abraunegg e99872eaa2
Fix 'Key not found: name' when computing skip_dir path (#701)
* OneDrive API difference between Personal & Business where some Business accounts do not send 'name' key with parent reference. Check for existance of 'name' key before use.
2019-10-26 14:17:40 +11:00
abraunegg 585b35724f
Reduce change scan impact of fix for #658 (#691)
* If there are delta changes (meaning something changed on OneDrive) process the changes that have been presented
2019-10-23 05:29:11 +11:00
abraunegg 1ab36f4014
Update skip_dir pattern matching when using wildcards (Issue #689) (#692)
* Better handle skip_dir searching when wildcards are involved by passing in a better 'path' snippet from which to compare skip_dir entries against
* Enhance the directory to 'search' to include simple & complex matching in case long paths are used as part of skip_dir
2019-10-22 14:08:17 +11:00
abraunegg cfdb295823
Fix typo - retrySucess -> retrySuccess
* Fix typo - retrySucess -> retrySuccess
2019-10-21 18:53:00 +11:00
Rob A 44576ea4ca Handle curl exceptions and timeouts better with backoff/retry logic (Issue #693) (#695)
* Handle curl exceptions and timeouts better with backoff/retry logic
2019-10-21 18:04:08 +11:00
abraunegg cdad8631ec
Update JSON logging output (#696)
* Update invalid JSON object output handling as this really should be debug messaging not error messages
2019-10-21 13:25:52 +11:00
abraunegg 6a8d575941
Modify 'Processing X changes' output to be more reflective of actual activity (Issue #679) (#680)
* When using 'sync_list' do not output that we are processing 'changes' as this is misleading.
* When using sync_list perform a full scan only the first time when using --synchronize & --monitor to avoid double processing of all OneDrive items each and every time
* When using sync_list and --monitor only perform a full object scan when we are also configured to perform a full scan
2019-10-09 12:02:17 +11:00
abraunegg 808a2f331b
Fix log output to be consistent
Fix log output to be consistent with sync_list exclusion
2019-10-08 18:11:37 +11:00
abraunegg 5da97d0757
Fix typo - skip_list -> sync_list
Fix typo - skip_list -> sync_list
2019-10-08 17:48:51 +11:00
abraunegg 57cf29783a
Fix handling of skip_dir, skip_file & sync_list config options (#686)
* config option skip_dir should only be applied to directories
* config option skip_file should only be applied to files
* If 'directory' is in 'skip_file' then upload skip reason erroneously lists sync_list as reason for skipping
* update log output when something is excluded
* where a path is to be excluded via sync_list, only exclude via sync_list & not check skip_dir & skip_file as well
2019-10-08 17:34:35 +11:00
abraunegg ca9a6b6ac0
Make user-agent string a configuration option (#673)
* Make user-agent string a configuration option
* Set default User-Agent to OneDrive Client for Linux v{version}
* Add 'user_agent' to default config file
2019-09-24 16:42:40 +10:00
Jon Mills 3aa4d4965e Return remote name when 'case-insensitive match' (#670)
If there is a case-insensitive match error, also return the remote name from the response
2019-09-23 17:35:18 +10:00
abraunegg fd4547376c
Fix crash when resume_upload file is not a valid JSON (#664)
* Validate that there is JSON data in the string before the string is read via parseJSON()
* Add try block to catch file system exceptions if they are generated when attempting to update the file date & time
2019-09-22 06:40:39 +10:00
abraunegg 72467e32ca
Update OneDrive API status code 500 handling (#661)
* Update OneDrive API status code 500 handling when uploading files as error message is not correct
2019-09-17 11:15:03 +10:00
abraunegg 2abc05af1d
Query for all changes if using sync_list file (#659)
* If we are using a sync_list file, using deltaLink will actually 'miss' changes (moves & deletes) on OneDrive as using sync_list discards changes
2019-09-16 05:06:02 +10:00
abraunegg e32b8b3c7f
Move logging of 'initialisation' to actually when the attempt to initialise is performed (#656)
* Move logging of 'initialisation' to actually when the attempt to initialise is performed
2019-09-11 20:26:21 +10:00
abraunegg 42d8c454e2
Fix downloading of files from OneDrive Personal Shared Folders (Issue #635) (#637)
* Fix downloading of files from OneDrive Personal Shared Folders when the OneDrive API responds with unexpected additional path data
2019-09-09 12:30:59 +10:00
abraunegg 0424caaaf8
Fix abnormal termination when no internet connection (#643)
* Fix abnormal termination when no internet connection
2019-09-06 13:12:13 +10:00
abraunegg 90a28e0f6c
Fix 'key not found: name' when checking if item was synced (#645)
* Fix searching for 'name' when deleting a synced item, if the OneDrive API does not return the expected details in the API call
2019-09-06 12:30:33 +10:00
abraunegg 5cd860a398
Fix handling of 5xx responses from OneDrive when uploading via a session (Issue #632) (#631)
* Fix handling of 5xx responses from OneDrive when performing a session upload
* Switch to same checks when doing non session upload so that OneDrive exceptions are thrown correctly
* Remove a 'throw e' when curl times out
* Remove a needless 'throw e' when a session upload cannot be found
* Set the upload failed flag when OneDrive errors on session uploads
2019-08-31 05:27:49 +10:00
abraunegg eb04ad5ffa
Remove redundant logging output (#627)
* Remove redundant logging output
2019-08-24 17:28:16 +10:00
abraunegg ad0daf2df5
Detect the need for --resync when config changes (#617)
* Detect the need for --resync when config changes either via config file or cli override
2019-08-24 17:18:58 +10:00
abraunegg bc3853bc4f
Add additional JSON object validation (#623)
* Add additional JSON object validation for queries made against OneDrive where a JSON response is expected and where that response is to be used and expected to be valid
2019-08-24 16:26:08 +10:00
abraunegg 488f756ecd
Fix unhandled error exceptions that cause application to exit / crash when uploading files (Issue #624) (#625)
* Remove 'else throw e' which causes the application to exit / crash and replace with what the actual error message is from OneDrive
* Make logging of unhandled errors consistent
* Add extra error handling when uploading files for errors received from OneDrive or file system errors
* Flag that the upload failed if there is an exception error raised
* Update logging output for when an error occurs to indicate that the file was skipped
* Log the OneDrive response as log.vlog rather than log.error as it is now being handled correctly
* Throw an exception for 50x errors so that it gets caught correctly
* Clean up logging when exception is generated
2019-08-24 15:54:48 +10:00
abraunegg 437fe4d9e4
Remove double logging output for a OneDrive 412 error (#622)
* Remove this logging output as it creates a double entry
2019-08-22 20:07:33 +10:00
abraunegg 893e235151
Catch a 403 Forbidden exception when querying Sharepoint Library Names (#620)
* Catch a 403 Forbidden exception when attempting to query for an Office 365 Shared Library Name
* Validate that the returned response is a valid JSON object
* Update scopes as per https://github.com/OneDrive/onedrive-api-docs/issues/1119
* Update that if a 403 error is received, what is the right course of action to take
2019-08-09 18:14:10 +10:00
abraunegg 4e97f8810d
Implement --get-file-link (#612)
* Implement --get-file-link which will return the weburl of a file which has been synced to OneDrive
2019-08-02 18:43:31 +10:00
abraunegg 100e644ae0
Catch error when creating sync dir fails (#608)
* Catch error when creating the sync dir fails - we cant run if this is not created or present
2019-07-31 07:20:26 +10:00
abraunegg 8f71043f23
Add a check to handle moving items out of sync scope & delete locally if true (#604)
* Add a check to handle moving items out of sync scope & delete locally if true
2019-07-30 07:02:24 +10:00
abraunegg 3171318503
Resolve file / folder upload issues (Issue #598) (#602)
* Without this throw, uploadLastModifiedTime fails to catch that the 412 error was returned, thus, the retry with a null cTag / eTag is not performed which leads to 'OneDrive response missing required 'id' element' being generated.
* Fix 'Unexpected character '<'. (Line 1:1)' when OneDrive has an exception error
* Validate that the response from OneDrive is a valid JSON object
2019-07-27 05:24:59 +10:00
abraunegg b41c5eb05d
Update Sharepoint modified file handling for files > 4Mb in size (#594)
* Update Sharepoint modified file handling for files > 4Mb in size
2019-07-17 05:11:38 +10:00
abraunegg 56644c4cbf
Update Sharepoint Document Library modified file handling (#590)
* Update Sharepoint Document Library handling for .txt & .csv files
* Use replace function for modified Sharepoint Document Library files rather than delete and upload as new file, preserving file history
2019-07-14 07:12:27 +10:00
abraunegg 66764f279d
Add explicit check for hashes being returned from OneDrive (Issue #591) (#592)
* Add explicit check for hashes to be returned in cases where OneDrive API fails to provide them despite requested to do so
* Add comparison with sha1 if OneDrive provides that rather than quickXor
2019-07-13 15:42:35 +10:00
abraunegg 68c6c5d75d
Fix hidden directories in 'root' from having prefix removed (#586)
* Fix hidden directories in 'root' from having prefix removed
2019-07-12 13:12:26 +10:00
Norbert Preining ab7e321726 Remove -d shorthand for --download-only (#577)
* Remove -d shorthand for --download-only to avoid confusion with other GNU applications where -d stands for 'debug'
2019-07-10 13:23:44 +10:00
Matthew Fallon f39621c2da Change unauthorized-api exit code to 3 (Issue #567) (#572)
* Changes unauthorized-api exit code to 3
* Systemd will not restart on exit code 3
2019-07-06 08:01:04 +10:00
abraunegg 80675aa8b4
Fix unable to download all files (Issue #563) (#568)
* Update logging output for better clarity
* Update logging output from vdebug -> error for errors
* Remove restrictive checks on fileDetails - if missing, continue, not return
* Add debug lines for if / when this is missing
2019-07-05 16:17:06 +10:00
abraunegg 1d02b3cb7a
Fix not all files being downloaded due to query failure & false DB update (#564)
* If query for file details or file object generates an error, we return, but we also need to flag that downloadFailed = true so that item is not added to the database which may cause validation issues leading to thinking that the file was downloaded but then deleted
2019-07-03 18:33:51 +10:00
abraunegg 4a4611ccea
Update fix for Issue #555 (#559)
* Update fix for #555 as try | catch block for session creation appears to miss error response codes
* Update how JSONValue object is determined to be valid
* Add error logging when response is not a valid JSON object
2019-06-30 10:12:25 +10:00
abraunegg 2f3804a3c0
Add download size & hash check (Issue #558) (#560)
* Check if the file that was downloaded to local disk equals the reported size & reported hash of the file on OneDrive. If sizes do not match, report an error and remove the local file as it is most likely corrupt.
2019-06-28 13:13:32 +10:00
abraunegg 15a2749382
Handle OneDrive error response on creating upload session (#556)
* Add a try block when attempting to create the upload session and handle if there is an error response from OneDrive
* Should return a JSONValue regardless of error
2019-06-27 18:40:18 +10:00
abraunegg d939d38c4f
Implement HTTP/2 downgrade by default (#549)
* Implement HTTP/2 downgrade by default to increase application stability when using curl >= 7.62
2019-06-21 01:11:29 +10:00
abraunegg bb2986b222
Add object check for json value (#551)
* Add explicit check that variable is a valid object
* Add default handling if query throws an error
2019-06-21 00:45:04 +10:00
abraunegg 10dd0300e3
Update issue #540 fix (#543)
* Update how and when filesize is configured and used before file download
2019-06-18 10:32:27 +10:00
abraunegg 687080d435
Size check should only be used if configured (Issue #540) (#541)
* Size check should only be used if configured
* Rather than make 2 x calls to OneDrive service, driveItem already has the size value to check
* Add a try block when query for file details
2019-06-17 10:16:27 +10:00
abraunegg bbf35f12ea
Handle a directory in the sync_dir when no permission to access (Issue #532) (#536)
* Handle a directory in the sync_dir when no permission to access
* Log the error during sync rather that only in verbose mode
2019-06-15 09:23:32 +10:00
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