From 9b38399aafa3bab301a35f2aff4235c881f02823 Mon Sep 17 00:00:00 2001 From: alex-z Date: Mon, 13 Nov 2023 15:44:15 +0100 Subject: [PATCH] Iteration for tests. Signed-off-by: alex-z --- src/libsync/propagateremotemove.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/libsync/propagateremotemove.cpp b/src/libsync/propagateremotemove.cpp index 1290863b6022f..8f85e34ed8621 100644 --- a/src/libsync/propagateremotemove.cpp +++ b/src/libsync/propagateremotemove.cpp @@ -266,17 +266,13 @@ void PropagateRemoteMove::slotMoveJobFinished() if (QFileInfo::exists(targetFile)) { // Delete old db data. - if (!propagator()->_journal->deleteFileRecord(_item->_originalFile)) { - qCWarning(lcPropagateRemoteMove) << "could not delete file from local DB" << _item->_originalFile; - done(SyncFileItem::NormalError, - tr("Could not delete file record %1 from local DB").arg(_item->_originalFile), - ErrorCategory::GenericError); - return; + if (!propagator()->_journal->deleteFileRecord(newItem->_originalFile)) { + qCWarning(lcPropagateRemoteMove) << "could not delete file from local DB" << newItem->_originalFile; } // TODO: vfs->setPinState(_item->_originalFile, PinState::Inherited) will always fail as item is already gone from original location, do we // need this? - if (!vfs->setPinState(_item->_originalFile, PinState::Inherited)) { - qCWarning(lcPropagateRemoteMove) << "Could not set pin state of" << _item->_originalFile << "to inherited"; + if (!vfs->setPinState(newItem->_originalFile, PinState::Inherited)) { + qCWarning(lcPropagateRemoteMove) << "Could not set pin state of" << newItem->_originalFile << "to inherited"; } } const auto result = propagator()->updateMetadata(*newItem);