Skip to content

Commit

Permalink
Iteration for tests.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Nov 13, 2023
1 parent 2a6a7eb commit 9b38399
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/libsync/propagateremotemove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9b38399

Please sign in to comment.