From: Christian Kamm Date: Fri, 29 Mar 2019 09:14:31 +0000 (+0100) Subject: PropagateDirectory: Remove dead code X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~261 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=69887c531e654fa527c03d10282abe77553fbe27;p=nextcloud-desktop.git PropagateDirectory: Remove dead code 1. The _firstJob is usually deleted by the time the PropagateDirectory finishes. (deleteLater() is called early) 2. The PropagateDirectory::_item and PropagateRemoteMkdir::_item point to the same SyncFileItem anyway. This code is a leftover from when each job had its own instance. --- diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 7b6d7191d..781ee30b7 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -971,12 +971,6 @@ void PropagateDirectory::slotSubJobsFinished(SyncFileItem::Status status) if (_item->_instruction == CSYNC_INSTRUCTION_RENAME || _item->_instruction == CSYNC_INSTRUCTION_NEW || _item->_instruction == CSYNC_INSTRUCTION_UPDATE_METADATA) { - if (auto *mkdir = qobject_cast(_firstJob.data())) { - // special case from MKDIR, get the fileId from the job there - if (_item->_fileId.isEmpty() && !mkdir->_item->_fileId.isEmpty()) { - _item->_fileId = mkdir->_item->_fileId; - } - } if (!propagator()->updateMetadata(*_item)) { status = _item->_status = SyncFileItem::FatalError; _item->_errorString = tr("Error writing metadata to the database");