diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index e67943bb211c1..f41dd8aee30f7 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -378,7 +378,7 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item) // Ensure it's a placeholder file on disk if (item->_type == ItemTypeFile && _syncOptions._vfs->mode() != Vfs::Off) { - const auto result = _syncOptions._vfs->convertToPlaceholder(filePath, *item); + const auto result = _syncOptions._vfs->convertToPlaceholder(filePath, *item, {}, Vfs::UpdateMetadataType::DatabaseMetadata); if (!result) { item->_status = SyncFileItem::Status::NormalError; item->_instruction = CSYNC_INSTRUCTION_ERROR; @@ -411,7 +411,7 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item) emit itemCompleted(item, ErrorCategory::GenericError); return; } - } else if (modificationHappened || prev._modtime != item->_modtime) { + } else if (prev._modtime != item->_modtime) { if (!FileSystem::setModTime(filePath, item->_modtime)) { item->_instruction = CSYNC_INSTRUCTION_ERROR; item->_errorString = tr("Could not update file metadata: %1").arg(filePath); diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index c7408f9f9dc68..9da353c47de4b 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -89,7 +89,8 @@ class TestSyncEngine : public QObject private slots: void initTestCase() { - OCC::Logger::instance()->setLogDebug(true); + Logger::instance()->setLogFlush(true); + Logger::instance()->setLogDebug(true); } void testFileDownload() {