From: Claudio Cambra Date: Fri, 7 Jul 2023 11:11:59 +0000 (+0800) Subject: Unify else and if in SyncEngine::slotItemDiscovered for filesystem setmodtime check X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~92^2^2~53^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=32145342c8ba4ce25a7a321d7c62199d34d11770;p=nextcloud-desktop.git Unify else and if in SyncEngine::slotItemDiscovered for filesystem setmodtime check Signed-off-by: Claudio Cambra --- diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 52985fd44..313f0597e 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