diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 52985fd445..313f0597e8 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -394,13 +394,11 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item) emit itemCompleted(item, ErrorCategory::GenericError); return; } - } else { - if (!FileSystem::setModTime(filePath, item->_modtime)) { - item->_instruction = CSYNC_INSTRUCTION_ERROR; - item->_errorString = tr("Could not update file metadata: %1").arg(filePath); - emit itemCompleted(item, ErrorCategory::GenericError); - return; - } + } else if (!FileSystem::setModTime(filePath, item->_modtime)) { + item->_instruction = CSYNC_INSTRUCTION_ERROR; + item->_errorString = tr("Could not update file metadata: %1").arg(filePath); + emit itemCompleted(item, ErrorCategory::GenericError); + return; } // Updating the db happens on success