diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 9ed5662d3..aba3f437f 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -1196,11 +1196,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; } }