always store newly created folders in DB even if it is missing

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2024-03-11 19:09:37 +01:00 committed by Matthieu Gallien
parent 899b147d59
commit e607e9d1fb

View file

@ -1069,17 +1069,17 @@ Result<Vfs::ConvertToPlaceholderResult, QString> 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;
}