abraunegg
4a8456fa96
Manually revert lastModifiedDateTime
...
* Manually revert lastModifiedDateTime
2018-04-21 07:24:19 +10:00
abraunegg
8a059dc0e1
Revert "Switch to using list_children for an item id's children"
...
This reverts commit fedaedacd7
.
2018-04-21 07:19:04 +10:00
abraunegg
3d224d0595
Revert "Resolve issue #73 - 507 Insufficiente Storage Exception"
...
This reverts commit 648c1ef094
.
2018-04-21 07:19:00 +10:00
abraunegg
894bdcde08
Revert "Fix itemdb.d assertion"
...
This reverts commit 66d00c5ec9
.
2018-04-21 07:18:53 +10:00
abraunegg
095aa64cd6
Revert "Revert 77c0cdbe24
temporarily"
...
This reverts commit be03fa48df
.
2018-04-21 07:18:46 +10:00
abraunegg
be03fa48df
Revert 77c0cdbe24
temporarily
...
* The fix in 77c0cdbe24
whilst resolves
'Key not found: lastModifiedDateTime' introduces a bug where files
deleted by onedrive, are not deleted locally. Reverting the change to
implement a fuller fix for 'Key not found: lastModifiedDateTime'.
2018-04-21 07:09:18 +10:00
abraunegg
66d00c5ec9
Fix itemdb.d assertion
...
* Fix core.exception.AssertError@src/itemdb.d(293): Assertion failure
introduced after onedrive.viewChildrenById(driveId, id) change
(fedaedacd7
)
2018-04-20 18:41:49 +10:00
abraunegg
648c1ef094
Resolve issue #73 - 507 Insufficiente Storage Exception
...
* Resove https://github.com/skilion/onedrive/issues/73 by implementing a
check, initialised on init() to track the space used by uploads vs space
available
2018-04-19 16:14:42 +10:00
abraunegg
fedaedacd7
Switch to using list_children for an item id's children
...
* Change how onedrive get's the children from a particular item id.
Previously view.delta was used to return the children, however
view.delta is not implemented on children when using OneDrive Business
accounts. By using list_children, we can get the children from any id
correctly when using either a 'personal' or 'business' account
2018-04-19 14:31:35 +10:00
abraunegg
77c0cdbe24
Resolve 'Key not found: lastModifiedDateTime'
...
* Fix 'Key not found: lastModifiedDateTime'
* Handling of Tombstoned items in the database
* Add for debugging purposes the rootID, driveID and Account Type
* Code cleanup - remove old commented out debugging items that are not
needed
2018-04-18 06:28:08 +10:00
abraunegg
835806f0eb
Update "hidden" directory & skip_file handling
...
* Partial rollback of 570d42269e
to
original logic behind isNameExcluded()
* Removed .* from default skip_file configuration
2018-04-16 21:39:45 +10:00
abraunegg
5cb92c01b9
Expand HTTPS debug to include GET JSON responses
...
* Change debug flag from --debug-http to --debug-https as OneDrive only
uses HTTPS, not HTTP
* Expand --debug-https to print the JSON responses to GET operations.
This is to assist with debugging #334 where a change in the MS API
(https://github.com/OneDrive/onedrive-api-docs/issues/834 ) no longer
sends 'lastModifiedDateTime' with responses to some GET's. This issue
seems to manefest itself with OneDrive Business accounts currently.
2018-04-15 20:02:39 +10:00
abraunegg
0febd67bd3
Add Microsoft naming conventions and namespace validation for items that will be uploaded
...
* Add Pull #104 (@JunpeiAnzai) to ensure that uploaded files conform to
Windows naming conventions and namespaces. Refer to
https://msdn.microsoft.com/en-us/library/aa365247 for further details
regarding Windows naming conventions and namespaces.
2018-04-13 11:20:38 +10:00
abraunegg
21f4d8e858
Add init.d service file & modify how configDirName is set
...
* Add init.d service file & helper script to start service
* Change how configDirName is set as XDG_CONFIG_HOME does not exist on
systems where X11 is not present. When using init scripts and using
XDG_CONFIG_HOME, ~ is not expanded thus existing config cannot be found.
Using ~ in --confdir also does not work when running under init.d
2018-04-13 09:33:16 +10:00
abraunegg
091e675d85
Update README.md based on current changes made
...
* Update readme
* Tweak logging output based on sync options selected
2018-04-12 10:18:18 +10:00
abraunegg
7eb11f0b44
Log why we are skipping a large file for upload
...
Log the reason why a file is not being uploaded (missed this in fec7654
)
2018-04-12 08:44:52 +10:00
abraunegg
fec7654118
Resolve Issues #121 , #294 , #329
...
Resolve onedrive crash when uploading files that exceed the allowed
OneDrive individual file limit
2018-04-12 07:31:42 +10:00
abraunegg
570d42269e
Fix onedrive not syncing "hidden" directories
...
* Fix the handling of hidden filenames & directories (.hello, .git etc)
so that these are uploaded / downloaded without issue.
* Add verbose logging for uploaded files as to why they were skipped
2018-04-11 13:02:06 +10:00
abraunegg
5e0e763317
Change logging of upload, download and deletion activities
...
Prior to this change logging of upload, download and deletion activities
were only written to the log file when using the --verbose flag, however
they would be written to console / syslog. This corrects that behaviour.
2018-04-10 20:03:28 +10:00
abraunegg
f1aa190a91
Add uploadOnly flag and add username to logfile name
...
* Add specific uploadOnly flag so that the onedrive client only uploads
data from the local directory and does not download changes from
OneDrive
* Change the logfile name to include the username running the onedrive
client
2018-04-07 17:06:57 +10:00
abraunegg
8463e60acc
Update onedrive.d to remove '&'
...
Change '&error' to 'error' on line 37 of onedrive.d
Issue uncovered where prior code with '&' would compile without issue on
DMD reference compiler v2.078.3 and below, but using '2.079.0' this
would throw an error if '&' was present.
The original patch added the '&' to get the code to compile, this simple
reverts this change.
Note: For future reference compile this code with DMD v2.079.0 or later.
2018-03-30 08:14:00 +11:00
abraunegg
dd73ae3c4b
OneDrive Client Changes
...
* Fix 4xx errors including (412 pre-condition)
* Add Logging - log to a file (/var/log/onedrive/onedrive.log)
* Add http(s) debugging as a flag
* Add dont sync when just blindly running the application
* Add individual folder sync - ie ~/OneDrive/blah/ vs. syncing
everything in ~/OneDrive/
* Add sync from local directory first rather than download first then
upload
* Add upload long path check (430 character limitation)
2018-03-14 15:43:40 +11:00
skilion
c231b13ad4
Disabled buffering on stdout
2018-02-18 18:24:46 +01:00
skilion
008a5756b3
Fix crash when the delta link is expired
2018-02-18 18:02:38 +01:00
skilion
d9a5d1b3b9
fix regex for parsing authentication uri
2018-01-20 21:13:01 +01:00
Mikael Göransson
a1e326f9b4
invalid_grant, error 70000
...
when trying to redeem an code, this error always occured, no matter
which parts of the response uri/url that was used.
the old regexp for parsing the code contained 3 groups, where as the
actual code always was the last group, and the second group was either ?
or &, and the first group would've been everything up until "code=".
changed from a matching group to character class so there would only be
two matching groups, so calling popFront() would actually leave the
authorization code in the front.
2018-01-20 20:51:33 +01:00
skilion
867c8ed26c
improved regex
2018-01-19 18:56:14 +01:00
skilion
03f746a650
Grammar fix
2018-01-19 17:56:36 +01:00
skilion
c7e09304a6
fix for https://github.com/skilion/onedrive/issues/269
2018-01-06 21:59:05 +01:00
skilion
abad626b3d
ensures that the parentId of the root is null
2018-01-06 19:27:27 +01:00
skilion
bb3121e10d
fix for https://github.com/skilion/onedrive/issues/269
2018-01-06 17:50:36 +01:00
skilion
9f7d9249bc
restore prev redirect url
2018-01-02 16:32:16 +01:00
skilion
96c364c5fc
removed tmp instruction
2018-01-02 15:06:20 +01:00
skilion
d7f6674f60
removed redundant key parentDriveId
2018-01-02 15:05:32 +01:00
skilion
4ebc4a8544
handle move and delete of remote folders in monitor mode
2018-01-02 13:41:56 +01:00
skilion
9bedec0d7c
handle moving items between drives
2018-01-01 18:38:08 +01:00
skilion
c54d1927e9
do not throw in makeItem
2018-01-01 16:20:28 +01:00
skilion
764975e224
download only option
2017-12-31 17:11:17 +01:00
skilion
80cfdf62cf
handle the case of deleting a remote folder locally
2017-12-31 16:56:56 +01:00
skilion
fba3ed999e
handle large uploads with parent id
2017-12-31 16:11:02 +01:00
skilion
c8d5e03be8
upload files new with parent id
2017-12-31 13:47:18 +01:00
skilion
6907daa5e8
create dir with parent id
2017-12-31 13:18:11 +01:00
skilion
95c952fe62
handle deleting remote folders
2017-12-31 12:44:41 +01:00
skilion
b7adc4d0cc
WIP on remote folders
2017-12-31 02:30:31 +01:00
skilion
b250214577
fix path handling of direct children of the root
2017-12-29 16:51:08 +01:00
skilion
dd3e1b2861
fix wrong parameters in call
2017-12-29 12:24:26 +01:00
skilion
48559c592d
fix handling root of remote item
2017-12-28 19:58:31 +01:00
skilion
90ab54cfc6
restore foreign keys and indices
2017-12-28 19:57:51 +01:00
skilion
8e91f57cb3
fix select children
2017-12-28 15:42:33 +01:00
skilion
e3f011b724
write logs on stdout instead of stderr
2017-12-28 15:21:41 +01:00
skilion
35ce743b39
removed exception chaining
2017-12-28 15:03:15 +01:00
skilion
789ec85e0c
partial remote items support
2017-12-27 15:13:28 +01:00
skilion
d9c9915bc3
update API to use full item addressing
2017-12-27 15:12:38 +01:00
skilion
22db459ac4
fixed bug where remotely deleted and recreated directories would make the application crash
2017-08-01 19:20:02 +02:00
skilion
9765b27902
new parameter syncdir
2017-08-01 19:11:50 +02:00
skilion
7fae9c1bef
versioning
2017-07-14 11:40:57 +02:00
skilion
849dd36276
check if the item is in the db before executing operations on it
2017-07-02 15:38:21 +02:00
lanhin
8f5f54f6a1
Merge branch 'master' of github.com:skilion/onedrive
2017-06-22 22:25:04 +08:00
skilion
a61abc4e15
fix issue #202
2017-06-20 22:01:57 +02:00
skilion
1581c6989a
fix error in QuickXorHash implementation
2017-06-16 11:40:07 +02:00
skilion
974be0884b
fixed bug where an item is incorrectly assumed to be a file
2017-06-15 15:17:47 +02:00
skilion
126f2719b8
hack for onedrive biz
2017-06-15 14:19:23 +02:00
skilion
3529a4f78b
make makeItem() more resiliant
2017-06-15 13:45:14 +02:00
skilion
9e2123249a
do not check token status during initialization
2017-06-15 13:02:04 +02:00
skilion
b703a824c7
compute path before performing selective sync
2017-06-15 12:59:33 +02:00
skilion
65bb14ad37
WIP for remote items support
2017-06-14 22:49:00 +02:00
skilion
7de0d97e6e
fix error message
2017-06-14 22:30:29 +02:00
skilion
35f81b2115
itemdb support for remote items
2017-06-14 15:50:02 +02:00
skilion
74c931cdba
added test for NULL values
2017-06-14 15:48:15 +02:00
skilion
c5a9b8b480
fix bug where remote items are wrongly identified as deleted
2017-06-12 17:54:33 +02:00
skilion
4f542800a7
fix bug when using personalized config dir
2017-06-12 17:54:33 +02:00
skilion
c2815d6498
fix indentation
2017-05-29 01:14:22 +02:00
skilion
ad5441ccdc
fix indentation
2017-05-29 00:23:55 +02:00
skilion
b5cbaa13cc
cleaned comments
2017-05-28 23:15:03 +02:00
skilion
8b6c99b0d9
notify deletion in verbose mode
2017-05-28 23:14:37 +02:00
skilion
305242d8a1
fix typo
2017-05-28 23:01:58 +02:00
skilion
809ccde562
workaround for old OneDrive files
2017-05-28 22:45:09 +02:00
skilion
8360d6508d
align message
2017-05-28 22:17:21 +02:00
skilion
44fc36fd8d
support for SHA1 and QuickXor hash algorithms
2017-05-28 22:13:19 +02:00
skilion
691862b18f
implement the recommended way to enumerate changes
2017-05-28 20:54:57 +02:00
skilion
3d8daa086d
added --print-token
2017-05-28 20:14:50 +02:00
skilion
80c60beef9
added newline at the end
2017-05-28 19:55:00 +02:00
skilion
7fec22bef1
fix variable type in for loop
2017-05-28 19:51:02 +02:00
skilion
9030a107b7
fix third person in comments
2017-05-28 19:49:55 +02:00
skilion
f19b86e4c7
QuickXor utility function
2017-05-28 19:37:51 +02:00
skilion
a2298be257
QuickXor implementation
2017-05-28 19:28:10 +02:00
lanhin
79139600ac
Merge branch 'master' of github.com:skilion/onedrive
...
This may fix some up load problems.
2017-04-24 13:45:52 +08:00
skilion
97a9d53914
refactored selective sync code
...
fixed bug in selective sync
2017-03-24 22:31:56 +01:00
skilion
0d69ed805d
wip for OneDrive Biz
2017-03-21 18:11:32 +01:00
skilion
1c7b726994
fix different time resolution when comparing
2017-03-21 18:11:32 +01:00
skilion
88d2a94078
added selective sync to monitor.d
2017-03-14 17:20:18 +01:00
skilion
79ed0a7883
fix different time resolution when comparing
2017-03-12 17:17:38 +01:00
skilion
2c1c168fab
fix root dir skipped when searching for new files
2017-03-12 16:35:47 +01:00
skilion
9dd944286f
new feature selective sync
...
removed system wide config file
hardcoded sane default config
updated README
2017-03-12 16:11:51 +01:00
skilion
8b204d18b4
hardcode the client id
2017-03-12 10:30:31 +01:00
skilion
ac555fd574
added missing scope
2017-03-11 14:52:33 +01:00
skilion
957b034805
exit early if the item is to be deleted
2017-03-11 14:21:00 +01:00
skilion
1260fcfcc1
fix addressing root by path
2017-03-11 13:34:07 +01:00
skilion
a3b25c45f5
catch CurlTimeoutException
2017-03-11 12:07:21 +01:00
skilion
1beadf2577
switch to Microsoft Graph API
2017-03-11 11:44:53 +01:00
skilion
203062fc6b
added missing item fields in saveItem()
2016-12-29 00:36:42 +01:00
skilion
0afb6fa392
workaround for error 412 (Precondition Failed) on item delete
2016-12-28 23:47:29 +01:00
skilion
6a7c30e34f
added missing checkAccessTokenExpired() in createByPath
2016-12-28 16:29:55 +01:00
skilion
3a10f0f4b5
fixed bug that allowed files marked for deletion to be keeped
2016-12-25 23:34:35 +01:00
skilion
ff58a86b7f
use libcurl to check connection
2016-12-25 23:34:35 +01:00
skilion
bbbfeb68f3
fix condition in applyDifferences loop
2016-12-25 20:19:54 +01:00
skilion
6913c87d5c
schema upgrade
2016-12-25 19:23:33 +01:00
skilion
c9016845c3
removed time comparison hack
2016-12-25 17:40:43 +01:00
skilion
ad4e910e55
check if the token is valid on init
2016-12-25 17:40:43 +01:00
skilion
82b2b63c75
added functions to get and set the db version
2016-12-25 17:40:43 +01:00
skilion
9ad9394b98
better handle the case when cTag is null
2016-12-25 17:40:43 +01:00
skilion
e33f566ecf
bug fix
2016-12-14 19:53:25 +01:00
skilion
7257c4c9bf
do not throw on expired status token
2016-12-14 15:17:20 +01:00
skilion
947136cf62
show onedrive error response
2016-12-13 18:04:16 +01:00
lanhin
7c112304b5
Bug fixed: 1. Replace mkdirRecurse with mkdir to deal nested directory;2. Before download an item, check if its dirName exists, if not, build it.
2016-11-23 23:10:37 +08:00
skilion
022ba09e41
added multiGlobMatch()
2016-09-18 11:50:10 +02:00
skilion
f5fc13cbad
getValue() with default return value
2016-09-18 11:37:41 +02:00
Jumpei Anzai
9209a649d7
avoid syncing broken symlink
2016-08-22 17:29:43 +09:00
skilion
c91decaa16
added logout cmd line option
2016-08-05 00:12:58 +02:00
skilion
738536736a
Refactoring
...
- unified configs
- logging module
- new cmd line option to change the config dir
2016-08-04 23:43:10 +02:00
skilion
7d700e1a4c
ask for the response uri one time only
2016-06-30 12:51:44 +02:00
skilion
18b279a339
restored AVOverride
2016-06-29 21:41:44 +02:00
skilion
09af80d843
create sync_dir if it doesn't exists
2016-06-28 14:21:48 +02:00
skilion
0efc2fe382
use view.delta instead of view.changes
...
removed dependency on client_secret
2016-06-27 19:23:14 +02:00
Jonathon M. Abbott
8b68adf8dd
Ignore antivirus errors when downloading files
...
- closes #31
2016-04-01 22:45:42 +10:00
skilion
880af3ec03
changed redirect_url to redirect_uri
2016-03-07 14:34:35 +01:00
skilion
89452985ec
workaround for segfault in std.net.curl.Curl.shutdown() on exit
2016-03-07 14:04:08 +01:00
skilion
5ed7dfcf3c
Merge pull request #27 from astanin/fix-missing-ctag
...
fix #24 : crash on sync if cTag is missing
2016-02-11 22:41:29 +01:00
Sergey Astanin
ab2923df4d
fix #29 : add a user-friendly message how to change fs.inotify.max_user_watches
2016-02-04 15:36:25 +01:00
Sergey Astanin
b824f87e7e
fix #24 : crash on sync if cTag is missing
...
According to https://dev.onedrive.com/resources/item.htm
cTag property is not returned if the Item is a folder.
2016-02-03 15:29:30 +01:00
skilion
c2b0b7f733
intercept curl exceptions
2015-12-29 19:38:15 +01:00
skilion
ea970890a2
capability to run as service
2015-11-29 21:12:44 +01:00
skilion
3f40728779
redirect stdout to stderr
2015-10-18 10:12:10 +02:00
skilion
288d1feac1
avoid full inotify restart in the monitor loop
2015-10-10 22:18:33 +02:00
skilion
32009e2747
responses are encoded in UTF-8
2015-10-04 17:33:48 +02:00
skilion
789bdf8390
ignore 404 errors on delete
2015-10-04 16:27:02 +02:00
skilion
e7d493807d
reimplemented std.net.curl basic methods in order to intercept http status codes
2015-10-04 16:24:45 +02:00
skilion
9da9b7240d
better way to check if a JSONValue has a member
2015-10-03 10:45:43 +02:00
skilion
2acd00209f
rename the local item if it is unsynced and there is a new version of it
2015-09-30 15:53:49 +02:00
skilion
9a50174c08
missing parameters were making uploads fail
2015-09-30 15:14:39 +02:00
skilion
10cfa83d39
fixed bug which caused dirs to not get deleted
2015-09-28 13:42:58 +02:00
skilion
9b80d99ad4
support for files bigger than 100 MB and resumable uploads
2015-09-28 13:25:25 +02:00
skilion
88b11433a7
removed space from auth url
2015-09-27 18:56:50 +02:00
skilion
b4aeda818a
regex simplified
2015-09-25 21:39:18 +02:00
skilion
7afae8fbb8
correct way to test if a value is in the AA
2015-09-24 19:12:19 +02:00
skilion
3489827431
alert when no config file is found
2015-09-24 18:59:17 +02:00
skilion
f7e4b2f1e3
fixed acces to json nested objects
2015-09-22 16:14:16 +02:00
skilion
07f5f1ce78
create config dir if it doesn't exist
2015-09-22 15:26:45 +02:00
skilion
7cfa936db8
changed how config files works
2015-09-22 14:48:18 +02:00
skilion
a032ef9671
changed help message
2015-09-22 11:52:57 +02:00
skilion
1c21474301
more error handling
2015-09-22 11:52:28 +02:00
skilion
85cd44cf73
better help message
2015-09-22 11:20:54 +02:00
skilion
da2cfbde9c
additional fix for wildcards
2015-09-22 11:16:06 +02:00
skilion
21993b36ee
removed useless destructor
2015-09-22 10:56:14 +02:00
skilion
c74282879b
fix Precondition Failed after upload
2015-09-21 17:23:12 +02:00
skilion
7ea7c0f9cd
case insensitive patterns
2015-09-21 13:04:05 +02:00
skilion
d2ec6c688f
better exception management
2015-09-20 21:21:51 +02:00
skilion
4498c03dec
skip slash from regex match
2015-09-20 20:23:09 +02:00
skilion
30504d7034
better path handling
2015-09-20 19:07:16 +02:00
skilion
a877bad3ad
run garbage collection after the synchronization
2015-09-20 14:49:44 +02:00
skilion
74fadfb262
support path with tilde
2015-09-20 14:20:01 +02:00
skilion
2d50e43674
removed path dependency in Item
2015-09-19 15:38:43 +02:00
skilion
8d00ad5672
updated monitor.d to filter paths
2015-09-19 14:25:39 +02:00
skilion
f0c12e4002
improved regex to use with paths
2015-09-19 14:21:33 +02:00
skilion
5c6ed227a7
assert on item select
2015-09-19 14:14:51 +02:00
skilion
59d7c0c311
use wildcards instead of regex
2015-09-19 09:45:45 +02:00
skilion
10efa036b4
implemented monitor filter
2015-09-18 22:56:09 +02:00
skilion
7126c4fefc
implemented filter in sync
2015-09-18 21:42:27 +02:00
skilion
9aa1f221c7
skip filtered files in applyDiifferences
2015-09-17 17:34:58 +02:00
skilion
9867a7abea
possibility to get a default value in Config.get
2015-09-17 16:43:45 +02:00
skilion
35c290c4a0
working monitor
2015-09-17 16:28:24 +02:00
skilion
e8f7d99653
check sqlite version
2015-09-17 10:50:20 +02:00
skilion
4d230a394c
finalizing
2015-09-17 00:16:23 +02:00
skilion
f887b29061
sync root folder
2015-09-16 10:29:20 +02:00
skilion
c3c3a714e7
skip root directory
2015-09-15 14:54:07 +02:00
skilion
2d4cf32be5
refactoring
2015-09-14 23:56:14 +02:00
skilion
ff07f13cd6
command line options
2015-09-14 19:21:06 +02:00
skilion
424e77e4b5
do not care about directory mtime
2015-09-14 12:57:47 +02:00
skilion
0f21508cfe
removed redundant column 'path' in the db
2015-09-14 11:56:40 +02:00
skilion
54e60d4528
real time changes
2015-09-11 18:33:22 +02:00
skilion
22b1107a10
finished monitor
2015-09-11 11:02:07 +02:00
skilion
482cd4be0b
wp on monitor
2015-09-10 23:05:15 +02:00
skilion
504b9d041a
fix error where JSONValue become an array instead of a string
2015-09-10 23:04:15 +02:00
skilion
2de650d2be
working uploadDifferences
2015-09-08 18:25:41 +02:00
skilion
c08706cbf8
added method to iterate trough all items
2015-09-07 18:33:16 +02:00
skilion
20dbc9795c
upload should fail if the file already exists
2015-09-07 13:28:15 +02:00
skilion
ac4584f795
half working uploadDifference
2015-09-06 22:42:44 +02:00
skilion
f8e87a2d4f
removed old code
2015-09-06 13:00:05 +02:00
skilion
84f6d59813
added createByPath
2015-09-06 11:06:13 +02:00
skilion
61c5ea7789
added deleteById
2015-09-06 10:23:32 +02:00
skilion
a732845db3
renamed check to checkHttpCode
2015-09-06 10:07:18 +02:00
skilion
60a5b799f9
added updateById
2015-09-05 21:23:43 +02:00
skilion
3357a013f7
uploadDifferences skeleton
2015-09-04 21:00:22 +02:00
skilion
9dea1c1448
set the callback earlier
2015-09-02 11:21:19 +02:00
skilion
8b7cf7a58d
removed useless dup
2015-09-02 11:20:42 +02:00
skilion
8cddcf3b80
renew access token after expiration
2015-09-01 22:23:42 +02:00
skilion
e2ad29744a
fix missing catch
2015-09-01 21:17:09 +02:00
skilion
00d53f648e
first commit
2015-09-01 20:47:44 +02:00