From b6c1a9c3c7cd88e561b006fcc46a5f69f9c66ad6 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 11 Mar 2024 19:09:37 +0100 Subject: [PATCH] always store newly created folders in DB even if it is missing Signed-off-by: Matthieu Gallien --- src/libsync/owncloudpropagator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index a5d10ed1c9037..1e46940b62b11 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -1069,17 +1069,17 @@ Result OwncloudPropagator::staticUpdat Vfs::UpdateMetadataTypes updateType) { const QString fsPath = localDir + item.destination(); + auto record = item.toSyncJournalFileRecordWithInode(fsPath); + const auto dBresult = journal->setFileRecord(record); + if (!dBresult) { + return dBresult.error(); + } const auto result = vfs->convertToPlaceholder(fsPath, item, {}, updateType); if (!result) { return result.error(); } else if (*result == Vfs::ConvertToPlaceholderResult::Locked) { return Vfs::ConvertToPlaceholderResult::Locked; } - auto record = item.toSyncJournalFileRecordWithInode(fsPath); - const auto dBresult = journal->setFileRecord(record); - if (!dBresult) { - return dBresult.error(); - } return Vfs::ConvertToPlaceholderResult::Ok; }