From: Christian Kamm Date: Tue, 16 Apr 2019 10:18:50 +0000 (+0200) Subject: SyncEngine: Don't close db when done #7141 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~246 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=21cb93e3cee0926854eae066e91cde683fbc0c93;p=nextcloud-desktop.git SyncEngine: Don't close db when done #7141 The db-close operation is likely a leftover from when the SyncEngine owned its own db connection and serves no purpose anymore. Closing the db causes the removal of the temporary wal and shm files. These files are recreated when the db is opened again, which happens almost immediately. This is a problem for winvfs because the delete-recreate step wipes the exclusion state on these files just after the sync is done. That meant that the db temporaries permanently had a "needs sync" icon marker shown in the explorer. Avoiding reopening the db also reduces the number of log messages per sync. --- diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index d2d963cff..98759348a 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -854,8 +854,6 @@ void SyncEngine::slotPropagationFinished(bool success) void SyncEngine::finalize(bool success) { - _journal->close(); - qCInfo(lcEngine) << "Sync run took " << _stopWatch.addLapTime(QLatin1String("Sync Finished")) << "ms"; _stopWatch.stop();