mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Unify else and if in SyncEngine::slotItemDiscovered for filesystem setmodtime check
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
0a86967f14
commit
32145342c8
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user