Commit graph

408 commits

Author SHA1 Message Date
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 8d13d3e850
Merge pull request #42 from abraunegg/Implement-Travis-CI
Add travis yml configuration
2018-06-30 14:21:53 +10:00
abraunegg 2c519c5867
Add travis yml configuration
* Add travis yml configuration
2018-06-30 14:17:43 +10:00
abraunegg 6199b40c56
Merge pull request #39 from abraunegg/Issue-#15
Fix: skip_file config entry needs to be checked for any characters to escape (Issue #15)
2018-06-30 09:11:35 +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 669c370248
Update README.md 2018-06-27 06:10:25 +10:00
abraunegg 54fcb63886
Update README.md 2018-06-20 07:36:57 +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 bc815541b6
Merge pull request #3 from ShadySquirrel/master
Update Makefile to better support packages that utilise make install / make uninstall
2018-05-25 00:09:14 +10:00
Shady Squirrel 56719619f6
Don't remove user configuration with uninstall
`make uninstall` is called by root user, which shouldn't be a primary user anyway,, so removing ~/.config/onedrive will not work for other, normal users.
2018-05-23 21:33:22 +02:00
Shady Squirrel c9caaada9b
Add missing DESTDIR variables
Without it, building of distribution package fails.
2018-05-23 21:31:20 +02:00
abraunegg fa5de0480b Merge branch 'master' of https://github.com/abraunegg/onedrive 2018-05-23 03:46:20 +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 e8d3a261f3
Update README.md 2018-05-17 06:59:09 +10:00
abraunegg 175f061691
Update README.md 2018-05-17 06:52:34 +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
abraunegg bf7986df14
Merge pull request #1 from mcmtroffaes/config-folder-fix
Fix config folder.
2018-05-16 18:38:12 +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 0ca87cb92d
Update README.md 2018-05-09 05:15:31 +10:00
abraunegg c6b15eef30
Update README.md 2018-05-07 06:25:03 +10:00
abraunegg d989a8a9d0 Update Readme
Update readme
2018-05-07 05:45:14 +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
abraunegg ccd4dfbaf7 Resolve #341 '--single-directory' edge case
* Resolve where '--single-directory' is used to sync a single directory,
but a file / folder is 'moved' on OneDrive to outside the scope of the
focus of the '--single-directory' path. Before this change, the file
would remain in the local path (original location) whilst it would
reside in the new OneDrive path. This patch looks for this mis match and
deletes the local file / folder to reflect it is no longer in the same
OneDrive path.
2018-04-29 12:39:27 +10:00
abraunegg 6fe06d03ac Resolve 'Directory not empty' issues on bulk deletes
* In some cases OneDrive does not send all delete changes or changes are
out of order. When deleting local files, this can lead to a 'Directory
not empty' error. This change adds to check for any remaining children
of a directory that is to be deleted and delete them before
2018-04-26 09:45:18 +10:00
abraunegg 65a1181fcf Resolve std.exception.ErrnoException when user not part of users group
* Resolve: std.exception.ErrnoException@std/stdio.d(423): Cannot open
file `/var/log/onedrive/xxxxx.onedrive.log' in mode `a' (Permission
denied). This issue occurs if the user running 'onedrive' is not part of
the standard 'users' group (GID 100)
2018-04-25 12:11:34 +10:00
abraunegg bc15d7f77f Display informative message when not using --synchronize
* Prior to all the changes in #314, the client would sync regardless of
options. #314 introduced a flag that must be included if you want to
sync, however there was no feedback if '--synchronize' was not included
and the sync was not occuring. This patch provides that notification &
feedback.
2018-04-24 12:14:36 +10:00
abraunegg 034eccfaec Resolve #132 - Couldn't resolve host name on handle
* By default the DNS timeout on HTTP.method is too short. If DNS
resolution takes too long, a resolution error is thrown. Increase DNS
timeout to 5 seconds.
* Cleanup unittest - double declaration
2018-04-24 12:10:27 +10:00
abraunegg dff245d29b Resolve 'view.delta can only be called on the root'
* Resolve the error 'view.delta can only be called on the root' when
using OneDrive Business Account & --single-directory switch
* Change checkDatabaseForOneDriveRoot so that it is performed at init()
and not needed to be called a number of other times throughout the code
- leads to less HTTPS calls being made
* Cleanup comments that are no longer relevant due to
checkDatabaseForOneDriveRoot being run at init()
2018-04-23 10:58:47 +10:00
abraunegg d3f406459c Update Makefile
* Update wildcard
2018-04-22 08:30:24 +10:00
abraunegg da9cc628cb Update Makefile and systemd files
* Change the ordering of 'make install' so that directories and
permissions are set first
* Use wildcard to copy service files to systemd directory as 'install'
was failing when there was @ in the script
* Update systemd units files based on
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ for
starting the onedrive service
2018-04-22 08:29:43 +10:00
abraunegg 63f991a64e Reduce HTTPS calls for rootId & driveId by using init() set values
* Rather than make repeated HTTPS calls for the OneDrive rootId &
driveId, reuse the rootId & driveId as set via init() where possible
2018-04-21 16:30:35 +10:00