diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 523f3506a193b..2c85fe5136f07 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -379,7 +379,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; @@ -412,7 +412,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 fa3e19f1318b2..8ef503956740a 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() {