Commit Graph

73 Commits (5bc503279a139f0cfe6d7f1a4e052a3cdd1909b7)

Author SHA1 Message Date
Vitaliy Filippov 5bc503279a Remove JSON-C json wrappers, use YAJL for everything 2015-05-16 00:37:02 +03:00
Vitaliy Filippov ac1763f2c7 Merge https://github.com/visap/grive/commits/visa 2015-05-16 00:36:26 +03:00
Vitaliy Filippov c0c89c306c Remove useless swap() code 2015-05-14 01:10:09 +03:00
Visa Putkinen 3775572f46 Retry upload on XML error instead of crashing
Sometimes the Google Drive API sends malformed XML which crashes grive.
This patch adds a simple try-catch to Resource::Upload that retries the
upload if an XML exception is thrown from AuthAgent::Put.
2013-11-27 00:15:24 +02:00
Visa Putkinen 84785ec473 Fix hang when upload receives HTTP 500
When an uploading PUT request got a HTTP 500 as reponse, grive hanged
forever inside libcurl. This was because the File parameter was not
rewound to 0 position on retry. The XmlResponse had to be cleared as
well.

Rewinding the File and clearing the XmlResponse were not enough to fix
the problem, because when retrying after 500, HTTP 410 Gone or 412
Precondition failed is often received, and CheckHttpResponse would throw
an exception that crashes grive. Therefore, I implemented a retry logic
to Resource::Upload that retries the whole upload transaction if 410 or
412 was received.
2013-11-27 00:15:24 +02:00
Visa Putkinen 8b434dad14 Reduce number of syscalls while scanning local files 2013-11-24 14:34:03 +02:00
Nestal Wan 62dc542341 refactored old GDoc API into v1 namespace. using v2 namespace for new Google Drive API 2013-04-29 23:47:33 +08:00
Nestal Wan 738435837b using DataStream instead of Receiveable 2013-04-29 23:47:32 +08:00
Nestal Wan 755ee1c9ad new qt gui 2013-04-29 23:47:32 +08:00
Nestal Wan 804fe923f2 refactored the config file part from #109 2012-07-30 16:52:59 +08:00
justin 034891a610 issue 86 allow sync folder to be specified, move Config class and add basic unit test 2012-07-29 18:17:41 +01:00
Nestal Wan d831b8d59f support creating revisions with --new-rev (#87) 2012-07-27 00:45:53 +08:00
justin 96227d38cf store modified time of file in m_mtime instead of passing value as param 2012-07-19 22:22:34 +01:00
Nestal Wan 28e8012ca5 added AuthAgent, a wrapper around http agent 2012-07-20 00:39:36 +08:00
Nestal Wan ce245576b5 use StdioFile for uploading (#88) 2012-07-17 01:58:16 +08:00
Nestal Wan 75c67dad8d added class & functions for memory mapped files 2012-07-17 01:08:34 +08:00
Nestal Wan 94383e0030 ignoring files with missing MD5 checksum in remote feeds 2012-07-16 23:37:50 +08:00
Nestal Wan 593c335a5e improved logging for HTTP responses 2012-07-16 23:23:08 +08:00
justin e28fe96260 fix deleted local file downloaded again 2012-07-15 17:33:33 +01:00
Nestal Wan 80f3fbf370 refactored the logs to debug sync problems 2012-07-12 00:36:58 +08:00
Nestal Wan c5a5221f4b disable an unimportant assertion and replace it with a warning 2012-06-20 22:46:17 +08:00
Nestal Wan a799e7a611 fixed boost fs v2 compile error found by pavel.savara 2012-06-20 22:02:42 +08:00
Nestal Wan 55c0f4e6d5 mark folder and its children as created/deleted recursively (#61) 2012-06-18 23:44:28 +08:00
Nestal Wan 023c208d85 fixed assertion on dry-runs 2012-06-18 23:17:28 +08:00
Nestal Wan 48391bb16f added more log for dry-run (#65) 2012-06-17 16:33:38 +08:00
Nestal Wan 55ac367255 escape the directory names when uploading (#66) 2012-06-17 15:58:27 +08:00
Nestal Wan ea4fda5b54 fix recursively add folder (#59) 2012-06-14 01:42:41 +08:00
Nestal Wan 8d822e3582 now sync'ing folder is the same as sync'ing files 2012-06-11 00:40:56 +08:00
Nestal Wan 991d8e444f recursively sync the resources 2012-06-10 23:38:27 +08:00
Nestal Wan 7be193c35b added unit test case 2012-06-10 23:11:32 +08:00
Nestal Wan f0ce00ca7b improved support for changes feed 2012-06-10 21:13:47 +08:00
Nestal Wan 55572c7fc4 refactored. Resource does not contain Entry 2012-06-10 21:13:46 +08:00
Nestal Wan 89e07bb257 removed OpenSSL in Download.cc 2012-06-10 15:36:37 +08:00
Nestal Wan e259478fb3 removed redundant function 2012-06-09 14:23:39 +08:00
Nestal Wan facdf88058 log uploading of files 2012-06-09 11:02:18 +08:00
Nestal Wan 271dd95b24 escape the document header. fix HTTP 400 when uploading 2012-06-07 18:26:57 +08:00
Nestal Wan 01effa1f60 revised the log messages 2012-06-06 23:40:17 +08:00
Nestal Wan c81bb0aaec fixed assertion if remote has dot file (#43) 2012-06-06 23:35:29 +08:00
Nestal Wan 8ff04683a8 removing debug code and minor fixes 2012-06-05 23:08:03 +08:00
Nestal Wan 935ac608ff handling change feed. some good news about trashed documents 2012-06-05 22:52:14 +08:00
Nestal Wan 8466095e7b adding change stamp 2012-06-03 23:58:28 +08:00
Nestal Wan 28b32c6f43 recursive delete handling for remote_deleted 2012-06-03 21:53:51 +08:00
Nestal Wan 379dddc532 fully configurable log 2012-06-03 18:31:02 +08:00
Nestal Wan 54b65bb738 update the resource by a GET before deleting it 2012-06-03 16:57:21 +08:00
Nestal Wan c17ba4e880 added the http::Header class. should add it long ago. 2012-06-03 16:42:51 +08:00
Nestal Wan 81f71f8406 fixed missing assignment of entry IDs 2012-06-03 15:55:32 +08:00
Nestal Wan 3d7ad69915 don't delete the file if its parent folder will be deleted 2012-06-03 14:44:09 +08:00
Nestal Wan 88cdb576c4 use ctime instead of mtime to detect changes 2012-06-01 23:30:04 +08:00
Matchman Green da6c99089f enabled code to "delete" files 2012-06-01 00:40:07 +08:00
Matchman Green 59d0761d68 minor refactoring 2012-05-31 23:48:30 +08:00