Commit graph

620 commits

Author SHA1 Message Date
abraunegg 6d92bc8210
Fix that Business Shared Folders with parentheses are ignored (#1560)
* Fix issue where matching a OneDrive Business Shared Folder that contains '()' is not matched correctly
2021-07-13 18:31:48 +10:00
abraunegg 1fbe1d34a7
Fix application crash due to a conversion overflow when calculating file offset for session uploads (#1558)
* Fix an unhandled application crash when calculating the required offset for a file fragment size when resuming a session upload
2021-07-12 05:59:32 +10:00
c-maia 7171b83f5b
Fix error message when deleting a large number of files (#1559)
"delete" word appears twice in the error message. This commit removes the extra "delete".
2021-07-11 07:37:57 +10:00
abraunegg 54a6575709
Fix application crash due to invalid UTF-8 sequence in the pathname for the application configuration (#1551)
* Catch a Invalid UTF-8 handling error when attempting to initialise the application. This is caused by the 'path' to the application configuration (typically ~/.config/onedrive) contains a bad UTF-8 character thus cannot be read / initialised
2021-07-07 06:26:52 +10:00
abraunegg fc5d7f9327
Fix application crash and incorrect handling of --single-directory when syncing a OneDrive Business Shared Folder due to using 'Add Shortcut to My Files' (#1542)
* When syncing OneDrive Business Shared Folders and using --single-directory, select correct driveId and itemId for the remote directory that needs to be synced
* Normally, the 'remoteItem' field will contain 'fileSystemInfo' however, if the user uses the 'Add Shortcut ..' option in OneDrive WebUI to create a 'link', this object, whilst remote, does not have 'fileSystemInfo' in the expected place, this leading to a application crash
2021-07-06 18:11:53 +10:00
abraunegg e236c7cf12
Handle OneDrive API Bad Request response when querying if file exists (#1535)
* Add exception handling for when the API returns a 400 error when attempting to query a path on OneDrive. If the path generates a 'bad request' response, this needs to be correctly handled.
2021-07-01 06:18:48 +10:00
abraunegg 761cf3eb87
Support DMD 2.097.0 as compiler (#1505)
* Support DMD 2.097.0 as compiler and resolve deprecation messages
2021-06-07 08:26:36 +10:00
abraunegg b0771f79e1
Fix application crash when SharePoint displayName is being withheld when using --get-O365-drive-id (#1445)
* Handle bad ShaprePoint data when the API does not return the expected data points when using those references to display what SharePoint sites are available when using --get-O365-drive-id
2021-05-10 08:04:14 +10:00
abraunegg c9ca00466a
Add file check when adding item to database if using --upload-only --remove-source-files (#1437)
* Add a file check when using --upload-only --remove-source-files so that parental paths are added to the database, to allow child objects to be uploaded in this scenario
2021-05-06 06:00:55 +10:00
abraunegg b7eedbd8cd
Fix that options --upload-only & --remove-source-files are ignored on an upload session restore (#1399)
* Fix that options --upload-only & --remove-source-files are ignored on an upload session restore
2021-04-12 06:16:23 +10:00
abraunegg 3d5957986a
Fix 'sync_list' handling of inclusions when name is included in another folders name (#1390)
* Fix 'sync_list' handling of inclusions when name is included in another folders name to avoid creating empty parental root folders. When a 'sync_list' entry ends with '/*' the common path matching causes a sub path match to occur. Before directly hitting as an exact match, perform an additional check of the path to sync against the sync_list entry without the '/*' being present.
2021-04-09 08:18:00 +10:00
abraunegg 615aa05b42
Fix an unhandled Error 412 when uploading modified files to OneDrive Business Accounts (#1394)
* Update error 412 handling when uploading modified files to OneDrive Business Accounts
2021-04-09 06:21:01 +10:00
abraunegg 94cc6ee3d6
Revert #1343 as OneDrive API is now fixed in relation to handling '%' within filenames (#1386)
* Revert #1343 as OneDrive API is now fixed in relation to handling '%' within filenames
2021-04-06 20:34:03 +10:00
abraunegg 1203aebeb7
Fix file kept in database when using --no-remote-delete & --remove-source-files (#1383)
* Fix file kept in database when using --no-remote-delete & --remove-source-files
2021-04-06 06:43:19 +10:00
abraunegg b1b814f10a
Fix uploading documents to Shared Business Folders when shared folder exists on a SharePoint site (#1352)
* Fix uploading documents to Shared Business Folders when shared folder exists on a SharePoint site due to Microsoft Sharepoint 'enrichment' of files

See: https://github.com/OneDrive/onedrive-api-docs/issues/935 for further details
2021-03-27 07:31:03 +11:00
abraunegg 5c8083001a
Update logging output to handle directory entries only (#1364)
* When in --monitor mode, avoid outputting misleading logging when the new or modified item is a file, not a directory
2021-03-27 07:29:08 +11:00
abraunegg fd04d632d6
Fix application crash when unable to rename folder structure due to unhandled file-system issue (#1366)
* Fix application crash when unable to rename folder structure due to unhandled file-system issue
2021-03-27 07:28:40 +11:00
abraunegg 6b20478635
Fix 'Item cannot be deleted from OneDrive because it was not found in the local database' (#1354)
* When in --monitor mode, and there are multiple driveId being used (shared folders), when a deletion event occurs, search the DB using all the known driveids rather than just the default one. When using just the default driveid, if the file to be deleted resides on another drive, the following error message is printed: 'Item cannot be deleted from OneDrive because it was not found in the local database' - which is not entirely accurate as the item is in the database, it is just not being searched for correctly.
2021-03-19 17:29:55 +11:00
abraunegg 0dcc76f9f1
Update 'Skipping shared folder due to existing name conflict' check for Business Shared Folders (#1351)
* Update 'Skipping shared folder due to existing name conflict' check for Business Shared Folders
2021-03-18 13:24:26 +11:00
abraunegg 037a6b43e1
Support multiple 'document libraries' within a single Shared Library Site (#1350)
* Support providing the 'drive_id' for multiple 'document libraries' within a single Shared Library Site
2021-03-17 18:23:01 +11:00
abraunegg 6bec0ddc64
Correctly handle files which contain '%' as invalid files (#1343)
* Fix checking filenames which contain '%' which should be classified as invalid based on the MS OneDrive API Invalid characters designation
2021-03-15 16:24:55 +11:00
abraunegg b8717fbc53
Use 'nextLink' value if present when searching for specific SharePoint site names (#1329)
* Use 'nextLink' value if present when searching for specific SharePoint site names
* Update error output to provide more details why an error occurred if a SharePoint site lacks the details we need to perform the match
2021-03-13 05:11:44 +11:00
abraunegg 7786a17915
Remove depreciated config option 'force_http_11' (#1323)
* Remove depreciated config option 'force_http_11' which was flagged as depreciated by PR #549 in v2.3.6 (June 2019).
2021-03-08 07:17:48 +11:00
abraunegg f107427480
Fix 'sync_list' path handling for sub item matching (#1317)
* Fix 'sync_list' path handling for sub item matching, so that items in parent are not implicitly matched when there is no wildcard present
2021-03-05 09:15:44 +11:00
abraunegg 81e40ba76d
Update 429 retry-after response handling (#1305)
* Always check the response headers when a 429 response is returned from OneDrive, so that the 'retry-after' value is correctly consumed and used
2021-03-03 11:12:27 +11:00
abraunegg 1078795d6f
Fix support for '/*' regardless of location within sync_list file (#1293)
* Fix support for '/*' regardless of location within sync_list file
2021-03-02 14:28:31 +11:00
abraunegg 42b7945d9c
Support sync_list matching full path root wildcard with exclusions to simplify sync_list configuration (#1273)
* Support sync_list matching full path root wildcard with exclusions to simplify sync_list configuration
2021-02-14 08:55:49 +11:00
abraunegg cd7b7b0b68
Use correct path offset for sync_list exclusion matching (#1269)
* When processing sync_list entries, by default, if the path starts with '/', and offset of 1 is used to ensure correct path matching can be done. However, if the path starts with '!/' or '-/' to exclude a certain path, an offset of 1 was still being used, thus, exclusion matching was not occurring correctly. Use the correct offset, based on the 'sync_list' entry.
2021-02-14 06:43:55 +11:00
abraunegg 3ea16b619f
Revert the config & logpath change and check correct input entry (#1270)
* Revert the config & logpath change introduced via #1267 as the logging path should not be the value checked, the input path is what should be checked
2021-02-13 17:37:22 +11:00
abraunegg f37fdda836
Fix logging output when handing downloaded files (#1267)
* Fix logging output when processing downloaded files to remove potential ambiguity as to what events are actually occurring with individual file events post download
2021-02-11 04:07:45 +11:00
abraunegg 1bfd995153 Revert "Fix logging output when handing downloaded new files (#1265)"
This reverts commit 99a0f4bfed.
2021-02-10 13:33:32 +11:00
abraunegg 99a0f4bfed
Fix logging output when handing downloaded new files (#1265)
* Fix logging output when processing files to remove potential ambiguity as to what events are actually occuring with indivudual file events
2021-02-10 13:26:10 +11:00
abraunegg 66a172d13a
Correctly handle '~' when present in 'log_dir' configuration option (#1258)
* Handle '~' when present in 'log_dir' and expand based on user and shell environment  variables to ensure correct expansion.
2021-02-06 20:46:56 +11:00
abraunegg 2c253362bf
Improve upload handling of files for SharePoint sites (#1250)
* After a file has been uploaded to SharePoint, use the response JSON and compare the quickXorHash to that of the local file before the upload. If there is a difference, Microsoft has modified the file post upload, thus we now need to download this 'updated' file. If there is no hash difference, we do not need to download the file.
2021-02-01 16:46:12 +11:00
abraunegg 3b87602a81
Use correct driveId value to query for changes when using --single-directory (#1235)
* Use the driveId value rather than defaultDriveId when looking for changes when using --single-directory
2021-01-22 14:38:11 +11:00
abraunegg 6b0b6a66f7
Search all distinct drive id's rather than just default drive id for --get-file-link (#1230)
* Add new DB query to return distinct driveId's from database
* Use all distinct drive ID's to query if path is in-sync with OneDrive before attempting to retreive the item file link from OneDrive
2021-01-20 19:46:56 +11:00
abraunegg 15a84627e1
Support new file maximum upload size of 250GB (#1233)
* Support new file maximum upload size of 250GB
2021-01-20 09:25:59 +11:00
abraunegg cef00e74b2
Catch database assertion when item path cannot be calculated (#1217)
* Catch database assertion when item path cannot be calculated
2021-01-15 14:44:13 +11:00
abraunegg 96d3e68498
Add new config option to rate limit connection to OneDrive (#1210)
* Add new config option to rate limit connection to OneDrive
2021-01-04 08:28:34 +11:00
abraunegg be1757148f
Add upload speed metrics when files are uploaded (#1209)
* Add upload speed metrics when files are uploaded
* Clarify 'data to transfer' is what is needed to be downloaded from OneDrive
2021-01-03 12:20:43 +11:00
abraunegg 62a2b4f393
Fix application crash with --get-O365-drive-id when API response is restricted (#1198)
* Check OneDrive API response for required elements before attempting to use elements for next query
2020-12-23 15:25:59 +11:00
abraunegg 771a93242f
Fix application crash when calculating the path length due to invalid UTF characters (#1193)
* Fix application crash when calculating the path length due to invalid UTF characters
2020-12-21 07:27:27 +11:00
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