PropagateLocalRemove: remove entries from the DB even if there was an error.
authorOlivier Goffart <ogoffart@woboq.com>
Wed, 2 Sep 2015 13:19:34 +0000 (15:19 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Wed, 2 Sep 2015 13:26:50 +0000 (15:26 +0200)
commite54253d8457f5e0eb071a7a704699149aec040e1
tree649f3927839dd592f30a918ad8231cdad99af510
parent141d43a1ee57a33a2e4d90e30571b863121c70fb
PropagateLocalRemove:  remove entries from the DB even if there was an error.

Previously, in case of an error while deleting a directory, we would not
remove the entries from the local db, despite most of the files would
be deleted.

Which means that if the files re-appear on the server with the same etag,
we would think the file were deleted from the client and propagate the change.

In 1.8.0 we had this bug that we would not see some directory in the server in
some cases. This would lead us to delete the file on the client.  Normaly the
files are deleted from the local database and next sync would re-download the files.
But in the cases where there was an error deleting one of the file (for example
if it was locked) we would then propagate the delete to the server.

Fix this by always deleting from the database the files that we deleted.

Issue #3206
src/libsync/propagatorjobs.cpp
src/libsync/propagatorjobs.h