Commit graph

79 commits

Author SHA1 Message Date
Klaas Freitag
ecb2444923 Handle changing source file in upload correctly.
Delete the file on the server if the source file is new, but
the source did not arrive completely within a timespan.
2013-11-22 19:45:26 +01:00
Klaas Freitag
55e82ee4c1 Made transaction management a bit more transparent. Some fixes. 2013-11-21 11:13:58 +01:00
Klaas Freitag
97c661c909 Cleanups 2013-11-20 14:59:58 +01:00
Klaas Freitag
5900b1ad25 Add blacklisting for files with error conditions. 2013-11-20 14:27:44 +01:00
Klaas Freitag
20b9ae757d Add a http status code varialbe to the sync item object. 2013-11-20 14:27:44 +01:00
Markus Goetz
e551e92e13 Downloads: Ignore file if no ETag was sent
Fixes part of #970
2013-11-19 12:44:25 +01:00
Klaas Freitag
69269f8f75 Use transactions to speed up database access. 2013-11-18 10:02:32 +01:00
Klaas Freitag
b0f6628584 Moved implementation of start() to cpp file. 2013-11-18 10:02:32 +01:00
Klaas Freitag
42f6867329 Add some useful logging. 2013-11-18 10:02:32 +01:00
Olivier Goffart
c15a1eedd1 Only update the db for ETAG if the etag has changed for directories 2013-11-15 13:53:18 +01:00
Klaas Freitag
c22f8a47f1 Initialise values properly, avoid warning. 2013-11-15 10:32:13 +01:00
Olivier Goffart
b3972a5ba8 Do not fetch the file id in the propagator with a HEAD
Normally, the fileid comes with the PUT or the GET.
If it did not comes with the PUT, it means the server do not support
fileid,  we should not query it with a useless HEAD.

Also, in case the fileid changes (which it should not)  update anyway
to the new fileid in the db
2013-11-15 10:18:19 +01:00
Olivier Goffart
e8e27b61f6 Revert the changes that fetch the file id in the propagator.
We don't want to fetch the file id in the propagator.

Revert "Put item member variable to base class."
This reverts commit f7aa2aa348.

Revert "Add isValidFileId and getFileIdPropget methods."
This reverts commit ccd254abba.
2013-11-14 14:59:03 +01:00
Klaas Freitag
ccd254abba Add isValidFileId and getFileIdPropget methods. 2013-11-14 11:37:08 +01:00
Klaas Freitag
2eb77445be Add rename actions to progress dispatching.
With that fix rename operations are shown as such in the progress
window and in bubble help etc.
2013-11-08 16:21:59 +01:00
Klaas Freitag
a458ffd472 Add missing return in error case. 2013-11-08 12:56:54 +01:00
Klaas Freitag
162acc1cc2 Fix conflict file handling, create a proper conflict file name.
Before this fix, the conflict file name was set in the file name
variable which lead to the problem that the subsequent rename of
the temp file to the final final filename was moving the temp file on
the conflict file. No final file was there.
2013-11-07 16:53:22 +01:00
Klaas Freitag
5cd2be058d Fix local rename. 2013-11-05 17:50:09 +01:00
Olivier Goffart
f0a1ac4346 Fix syncing folder with nothing in it
Do the start after connecting, as the finish may be imediate if there
is nothing to do.
2013-10-31 12:11:56 +01:00
Klaas Freitag
c66a1d1895 Removed unused code from LocalRename 2013-10-30 18:14:33 +01:00
Klaas Freitag
cdee0dc1cf Added a PropagateLocalRename job to do local renames. 2013-10-30 17:37:34 +01:00
Klaas Freitag
a43c5fcfe8 Fix header name according to changes on server master. 2013-10-30 17:37:34 +01:00
Olivier Goffart
5c67f39476 Ignore error 404 on DELETE
This may happen if we have stale entries in the database
2013-10-30 17:33:06 +01:00
Olivier Goffart
9500c5ffab Do not change the instruction anymore when we finish an item
The status is in the status.  Keep the original instruction so the
UI knows what to display for eath item
2013-10-30 10:46:05 +01:00
Olivier Goffart
6e088e28f5 Adjust the mtime in case of fake conflicts
"Fake conflicts" happen when the etag changes on the server, and the
mtime changes on the client,  but the actual file is still exactly
the same.  We correctly detect them as false conflict and we do not
generate the conflict file for them.
But we should also update the local mtime to the server mtime so future
sync don't get confused.
2013-10-29 12:23:51 +01:00
Olivier Goffart
01e2743bae Always download the conflicted files.
Conflicts have a direction==NONE. And they need to be downloaded, not uploaded
2013-10-29 12:13:30 +01:00
Olivier Goffart
75ffa787a6 emit the EndDownload progress at the right place.
It was put in rename instead of download
2013-10-29 12:13:30 +01:00
Olivier Goffart
adc47948a5 Add a comment explaining OwncloudPropagator::start 2013-10-28 17:00:27 +01:00
Olivier Goffart
6e886e28e9 Merge branch 'propagator-job'
Conflicts:
	src/mirall/owncloudpropagator.cpp
2013-10-28 16:26:25 +01:00
Olivier Goffart
84a40dcb59 Refactor the new propagator in jobs
This makes the code (IMHO) more easy to understand, and will allow
even more easy parallelism
2013-10-28 15:58:35 +01:00
Klaas Freitag
68ba99b7f0 Fixed fileID parsing and improved logging. 2013-10-28 15:28:34 +01:00
Klaas Freitag
17220f2604 Query file Id from server if unknown. 2013-10-25 13:31:00 +02:00
Klaas Freitag
7a68961b25 Add handling for the file_id data to the sync items. 2013-10-25 13:31:00 +02:00
Olivier Goffart
0efbfb10aa Fix MOVE of directory.
Remove the right entry from the database (i.e: the original file name)
Fetch the etags of the sub entries
2013-10-17 13:06:39 +02:00
Klaas Freitag
660469cbf5 Do not propagate a move of the Shared folder. 2013-10-17 10:48:31 +02:00
Olivier Goffart
746b86a1dd Save the progress db once a chunk has been upload
Allow to resume when we cancel the sync
2013-10-16 16:47:24 +02:00
Olivier Goffart
313832de8d Put the progress database within the journal 2013-10-16 12:01:14 +02:00
Klaas Freitag
1ed8afba09 Minor changes. 2013-10-09 14:27:28 +02:00
Olivier Goffart
7c6fcf688c Fix the fact that some success was reported as error 2013-10-04 15:55:59 +02:00
Olivier Goffart
127055dd70 Refactor a bit the error reporting from the propagator
Add different classes of error failures.
Fatal error means the sync should be stopped.
SoftErrors are not to be displayed to the user.

We still need to make a classification of the errors.
2013-10-04 15:55:59 +02:00
Olivier Goffart
baa9ba089c Save the database after each operation. 2013-10-03 22:41:12 +02:00
Olivier Goffart
3495b822a5 TMP 2013-10-03 20:01:07 +02:00
Klaas Freitag
0fef88a9b9 Some comments added. 2013-10-03 15:29:10 +02:00
Olivier Goffart
b18810f381 Implement abort with the new propagator
abort was implemented in csync after the new propagator was written,
so it was not working with the new propagator
2013-10-03 14:35:56 +02:00
Olivier Goffart
47f299f0ee Send the last known etag to the server in a If-Match header
That way we avoid race conditions in case the file changed between the
update and the reconcile
2013-10-02 15:57:49 +02:00
Olivier Goffart
d135aab86c clear the etag in every cases, not only when we upload files 2013-10-02 15:57:49 +02:00
Olivier Goffart
e2a2b882bb Remove the unused errorDetails
It was not displayed to the user. Only use errorString instead.

Also report neon error to the user
2013-10-02 15:57:49 +02:00
Klaas Freitag
de9dcbd231 Transmit the new mtime of the file with the PUT request.
If the server supports it already, we can save another request by
sending the mtime as a header value in the PUT request and check the
servers reply for a acknoledge header.
2013-09-25 14:26:13 +02:00
Daniel Molkentin
00d09763af Fix compile error 2013-09-10 11:37:52 +02:00
Daniel Molkentin
51a7cbeb55 kill warning 2013-09-05 20:15:55 +02:00