Skip to content

Commit

Permalink
Fix regression in the PropagateDirectory::slotSubJobsFinished.
Browse files Browse the repository at this point in the history
Signed-off-by: allexzander <blackslayer4@gmail.com>
  • Loading branch information
allexzander committed Aug 5, 2022
1 parent 08bd625 commit 795bb41
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1194,11 +1194,15 @@ void PropagateDirectory::slotSubJobsFinished(SyncFileItem::Status status)
if (!_item->isEmpty() && status == SyncFileItem::Success) {
// If a directory is renamed, recursively delete any stale items
// that may still exist below the old path.
if (_item->_instruction == CSYNC_INSTRUCTION_RENAME
&& _item->_originalFile != _item->_renameTarget) {

if (_item->_instruction == CSYNC_INSTRUCTION_RENAME && _item->_originalFile != _item->_renameTarget) {
if (!propagator()->_journal->deleteFileRecord(_item->_originalFile, true)) {
qCWarning(lcDirectory) << "could not delete file from local DB" << _item->_originalFile;
_state = Finished;
status = _item->_status = SyncFileItem::FatalError;
_item->_errorString = tr("could not delete file %1 from local DB").arg(_item->_originalFile);
qCInfo(lcPropagator) << "PropagateDirectory::slotSubJobsFinished"
<< "emit finished" << status;
emit finished(status);
return;
}
}
Expand Down

0 comments on commit 795bb41

Please sign in to comment.