Commit graph

260 commits

Author SHA1 Message Date
abraunegg e0b1b595e4
Add file access check for file upload (#116)
* Add a check to validate that we can read the file by reading the first 10MB when uploading a new file or resuming an upload
2018-08-14 18:30:13 +10:00
abraunegg 6a5ab5607a
test for curl exception when checking online status (#117)
* Check for a curl exception when checking the online status of the client at startup
2018-08-14 07:21:11 +10:00
abraunegg 6a6e0079af
Update --no-remote-delete to handle directories (#119)
* Update --no-remote-delete to handle not to delete remote directories if deleted locally
2018-08-14 07:16:20 +10:00
abraunegg bed2b6c75f
Implement Feature Request: Add a progress bar for large uploads & downloads (Issue #12) (#99)
* Implement feature request to add a progress bar for large file uploads & downloads
2018-08-10 07:46:27 +10:00
abraunegg 2bb5dce752
Fix --no-remote-delete (#110)
* Original implementation of --no-remote-delete used a cfg value, however this introduced 2 issues - value could be set via a config parameter which was not the intention, but also could be set to a non true value causing application issues. This patch resolves how  --no-remote-delete should have originally been implemented
2018-08-10 07:40:17 +10:00
abraunegg e922a7d85e
Implement Feature Request: Make checkinterval for monitor configurable (Issue #31) (#97)
* Implement Feature: Make checkinterval for monitor configurable
* Update monitor mode processing logic
2018-08-08 05:35:18 +10:00
abraunegg 2a113de66c
Resolve missing config value: no-remote-delete (#103)
* Resolve missing config value: no-remote-delete
2018-08-07 19:27:21 +10:00
abraunegg 2e04bf534a
Implement Feature Request: Upload Only Option that does not perform remote delete (Issue #49) (#96)
* Implement Feature Request: Upload Only Option that does not perform remote deletes
2018-08-05 10:43:31 +10:00
Leif Denby c0074638da Add ability to skip symlinks (Issue #87) (#92)
* Add ability to skip symlinks
2018-08-03 06:02:10 +10:00
abraunegg aa995eb3d3
Implement better handling of database errors & database disk space issues (Issue #77) (#80)
* Implement better handling of database exit scenarios when there is zero disk space left on drive where the items database resides (Issue #77)
* Implement better handling of incorrect database permissions
* Implement better handling of different database versions to automatically re-create tables if version mis-match (RHBZ #1598934)
2018-08-02 08:28:52 +10:00
abraunegg 91d8b7ab93
Gracefully handle a timeout when accessing the Microsoft OneDrive Service (Issue #82) (#86)
* Gracefully handle a timeout when accessing the Microsoft OneDrive Service
* Update HTTP connection handling for long running operations based on https://forum.dlang.org/post/k2vbk5$re7$1@digitalmars.com & https://github.com/dlang/phobos/pull/797
2018-08-02 08:25:37 +10:00
abraunegg 6b670df686
Fix localFileModifiedTime to not use fraction seconds (#91)
* Fix localFileModifiedTime when uploading a new file to compare using no fraction seconds
2018-08-02 08:22:26 +10:00
abraunegg a491620c1a Update logging message for single directory removal
* Update logging message for single directory removal - we are trying to delete not create
2018-07-19 06:43:30 +10:00
abraunegg d0209d8dbc
Gracefully handle OneDrive account password change (#73)
* Gracefully handle OneDrive account password change rather than crashing if authorization token is now invalid
2018-07-16 09:58:36 +10:00
abraunegg a4e055fdc3
Update 'HTTP 412 - Precondition Failed' error handling (#67)
* Update 'HTTP 412 - Precondition Failed' error handling based on local testing to ensure a http 412 response is gracefully handled & the modified file is subsequently uploaded to OneDrive successfully.
2018-07-16 06:36:31 +10:00
abraunegg 54ae6eacad
Update logic --upload-only and --local-first (#71)
* Update the logic handling of --upload-only and --local-first to be more consistent regardless of using --single-directory or not.
2018-07-15 15:22:08 +10:00
Robert Foster f3f216c1a8 Fix for Issue #23 (#60)
* Resove computeQuickXorHash generates a different hash when files are > 64Kb
2018-07-11 06:43:45 +10:00
abraunegg c0d2874ace
Fix: skip_file configuration doesn't handle spaces or specified directory paths (Issue #52) (#57)
* Update skip_file handling by using updated wild2regex to check files & paths of items to skip ro resolve issue #52
2018-07-10 13:08:17 +10:00
abraunegg 4667ecad12
Fix: Crash if file is locked by online editing (status code 423) (Issue #36) (#50)
* Resolve application crash if file is locked by online editing (status code 423)
2018-07-10 10:30:22 +10:00
abraunegg 0215774726 Import only atoi
* Import only atoi
2018-07-10 09:21:47 +10:00
abraunegg 9cb8c297fe comment out meaningless output for the moment
* item.name is not available, so we get a bunch of meaningless log output when deleting items. This will get fixed when wider logging changes are synced in
2018-07-10 09:14:35 +10:00
abraunegg fed53e8612
Update sync_dir handling (#55)
* Update sync_dir handling to use the absolute path for setting parameter to something other than ~/OneDrive via config file or command line
2018-07-10 05:34:27 +10:00
abraunegg 0109ef6a0c
Resolve compilation issue with dmd-2.081.0 (#48)
* Resolve: Error: module `stdlib` is in file 'std/c/stdlib.d' which cannot be read when using dmd-2.081.0 due to deprication of function - https://dlang.org/changelog/2.081.0.html#remove_std_c
2018-07-04 11:37:00 +10:00
abraunegg 83c28ba3b6
Fix: Multiple versions of file shown on website after single upload (Issue #2) (#40)
* Resolve multiple versions of file shown on website after single upload - however Issue #23 & OneDrive API bug (https://github.com/OneDrive/onedrive-api-docs/issues/877) will still create 2 file versions on OneDrive Business. The work around is to disable file versions until #877 is resolved.
2018-07-03 07:24:57 +10:00
abraunegg 5e48ba96ac
Fix: Error when trying to upload a file with weird non printable characters present (Issue #35) (#41)
* Implement an invalid whitespace filename check which currently checks for a 'new line' whitespace entry in a filename. Regex can be expanded if other files with similar characteristics are found.
2018-07-02 19:40:54 +10:00
abraunegg 871b3d72c4
Fix: Name checking rule not exactly right (Issue #34) (#38)
* Fix regex for name checks to be more explicit
* Update name validation checks to be more compliant with Microsoft requirements
2018-07-02 14:05:21 +10:00
abraunegg 6036283d20 Add '+' as a character to escape
* Add '+' as a character to escape when using the wild2regex function
2018-06-28 13:46:20 +10:00
abraunegg 63c5dd86b7
Merge pull request #28 from abraunegg/Issue-#8
Implement feature request: Detect when sync-folder is missing
2018-06-27 16:27:41 +10:00
abraunegg 77ac29acdf Update feature flag
* Update feature flag from 'check-mount' to 'check-for-nomount' as this is what this option does
* Add information into readme file
2018-06-27 06:23:17 +10:00
abraunegg 17e5138b5a
Resolve sync issues with Shared Folders & Personal OneDrive Accounts (#26)
* Resolve Shared Folders not syncing (OneDrive Personal)
* Resolve 'Key not found: fileSystemInfo' when then item is a remote item (OneDrive Personal)
* Resolve where file names are being truncated by 5 characters with each sync (OneDrive Business)
* remove extra // not required
* Remove commented out code to avoid confusion
2018-06-17 12:02:58 +10:00
abraunegg 1cfe137a92 Implement feature request: Detect when sync-folder is missing
* Provide a new switch 'check-mount' which will check for the presence of a hidden file '.nosync' file. If this file is found in the sync dir, then the sync process will shutdown. Refer to #8 for further details.
2018-06-17 08:27:43 +10:00
abraunegg d6b4930d0a Revert "Resolve: Key not found: fileSystemInfo when syncing shared folders"
This reverts commit e7267e597b.
2018-06-13 16:35:52 +10:00
abraunegg 2fe63f581d Revert "Encode syncFolderName for easier 'canFind' processing"
This reverts commit 943fcc032b.
2018-06-13 06:46:56 +10:00
abraunegg 943fcc032b Encode syncFolderName for easier 'canFind' processing
* Resolve "Remote change discarded - not in --single-directory scope" when syncing Shared Folder sub directories
2018-06-10 11:10:49 +10:00
abraunegg e7267e597b Resolve: Key not found: fileSystemInfo when syncing shared folders
* Resolve #11 where shared folders were unable to be sync'd due to fileSystemInfo data being within the remoteItem object
* Initial work on resolving #2, but fix not validated or complete
2018-06-09 21:43:39 +10:00
abraunegg 2576b69a88 Resolve 'database is locked' message and crash
* Resolve 'database is locked' when another onedrive process is running and has exclusive access to the database
2018-06-02 06:19:29 +10:00
abraunegg dc4bfb62ff
Update sync.d
Update comment - 256 -> 400
2018-05-25 14:17:28 +10:00
abraunegg 3381511e19 Update path and naming limitations
* Resolve https://github.com/abraunegg/onedrive/issues/6
* Update OneDrive Business path length to 400 characters
* Update allowed characters for path and file names
2018-05-25 14:12:39 +10:00
abraunegg 18ee4649e0 Resolve #356 by adding additional check for 409 response
* Add an additional check for 409 (Conflict) being returned when creating directories even when the directory is only attempted to be created when it cannot be found.
2018-05-23 03:46:13 +10:00
abraunegg 2827467296 Resolve std.file.FileException when checking logfile path
* Resolve std.file.FileException@std/file.d(2954): /var/log/onedrive/: Permission denied when there is no permission to create the directory on application startup
2018-05-16 19:19:43 +10:00
Matthias C. M. Troffaes c863d2c3c9 Fix config folder. 2018-05-16 09:11:50 +01:00
abraunegg 0b1ca6dbfd Fix incorrect id tag
* Fix incorrect id tage when checking database if item exists
2018-05-15 07:15:54 +10:00
abraunegg 8b0e9513e3 Resolve another itemdb.d(307): Assertion
* Clean up --single-directory logging as we should not be spilling out the actual item details
* Fix some spelling errors
* Fix another core.exception.AssertError@src/itemdb.d(307): Assertion failure when attempting to compute the path
* Fix logging when items are being filtered out as non relevant
* Add upload validation that file uploaded equals the size of the file locally as this is a contributing factor to 412 errors
2018-05-15 06:59:17 +10:00
abraunegg 9520fe7716 Resolve itemdb.d(295): Assertion failure
* Resolve core.exception.AssertError@src/itemdb.d(295): Assertion failure when performing a --single-directory sync
2018-05-09 16:39:23 +10:00
abraunegg 41976ed216 Update long path handling
* Update long path handling to account for differences between OneDrive Personal and OneDrive Business Accounts
* Update logging to be cleaner on fragment uploads
2018-05-09 06:47:03 +10:00
abraunegg accb62bdeb Update logging of 500 & 504 errors
* Update logging of 500 & 504 errors. For 504 errors this was 'breaking the formatting of the log line. For 500 errors - this needs to be logged regardless of verbosity.
2018-05-07 05:37:47 +10:00
abraunegg 0c4def83f8 Resolve 500 & 504 HTTP Status Codes
* When completing some operations on OneDrive, a 504 error can be returned when Microsoft Graph times out when communicating with internal resources. Rather than failing, handle the 504 and retry the request.
* When performing numerous changes via OneDrive online, Microsoft Graph has an issue in interpreting the the response, thus generates a 500 internal server error. As this is something we cannot fix, handle the 500 error by gracefully exiting.
2018-05-05 17:00:50 +10:00
abraunegg 4e0c3a4cf0 Integrate #346 for sqlite performance enhancement
* Update database journal mode to WAL as per
https://www.sqlite.org/wal.html
2018-05-03 16:38:40 +10:00
abraunegg 0b5dc66507 Rework OneDrive generating a 412 'Precondition Failed' Error
* Rework the 412 fix so that the OneDrive client gracefully handles the
error & retries the metadata update without the eTag/cTag causing the
issue.
* Fix the double logging to console of 'upload' and 'download' items
2018-05-03 16:21:53 +10:00
abraunegg 90dec8d6f1 Resolve build deprecation warning
* Resolve build warning: Deprecation: `std.net.curl.dur` is not visible
from module by adding std.datetime & reordering dependancy import order
2018-04-30 19:41:54 +10:00