There also was a bug in syncjournaldb: in some error conditions the
sql query wasn't reset properly. We now always reset a query before
calling bindValue.
* Downloadinfo entries for files that no longer need to be downloaded
are useless and can be removed. In particular, the temporary files
holding partially retrieved files are now deleted when no longer
necessary.
* The same is true for blacklist entries for paths that are no longer
being discovered.
* Same for uploadinfos for files that no longer need to be uploaded.
When recovering from a inalid move operation, we call
avoidReadFromDbOnNextSync. This will remove the fileid from the db so
we don't detect a move on the next sync. But we want the next sync to fetch
the file id again, and this can only happen if we don't read them
from the db and do the actual PROPFIND, this is done by avoidReadFromDbOnNextSync
However, if there is propagation in that source directory later, it
will overide the invalid etag with the real one and we will not uissue the PROPFIND
to fetch the fileid.
We must therefore also protect the future write to the DB when calling
avoidReadFromDbOnNextSync
When we detect a precondition failed, it is possible that it is
because the etag in the database is wrong. We must therefore not
read from the database on the next sync. In order to avoid that, we
reset the etag of parent directories to invalid values
Fixes#1767
All public function must lock the mutex. And therefore none of the journal
function may call public function because the mutex is already locked.
So have a public commit that lock the mutex, and a private commitInternal
that assume the mutex is locked
As the csync updater opens the database itself, it is cleaner to close
the db before and open it again after csync has finished.
Added a close method to the journal class.