]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Unify else and if in SyncEngine::slotItemDiscovered for filesystem setmodtime check
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 7 Jul 2023 11:11:59 +0000 (19:11 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 7 Aug 2023 08:25:19 +0000 (16:25 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/libsync/syncengine.cpp

index 52985fd4454ab82081472adc7d1ada27c65cfc16..313f0597e85202bcf888e75968acf85ebf9a8dd1 100644 (file)
@@ -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