From: Christian Kamm Date: Thu, 15 Nov 2018 09:26:48 +0000 (+0100) Subject: vfs: Switch order of deletion and journal removal in dehydration X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~380 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=842577e014db0f2c7ff734adb49f541d30bce92f;p=nextcloud-desktop.git vfs: Switch order of deletion and journal removal in dehydration To be more crash-resilient. --- diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index a5d87effa..b4607a63b 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -423,8 +423,8 @@ void PropagateDownloadFile::startAfterIsEncryptedIsChecked() // TODO: Could dehydrate without wiping the file entirely auto fn = propagator()->getFilePath(_item->_file); qCDebug(lcPropagateDownload) << "dehydration: wiping base file" << fn; - QFile::remove(fn); propagator()->_journal->deleteFileRecord(_item->_file); + QFile::remove(fn); if (vfs && vfs->mode() == Vfs::WithSuffix) { // Normally new suffix-virtual files already have the suffix included in the path