From e1b3354de3e7e89cd37759e90f9f50a9ffb85473 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 19 Apr 2021 15:06:40 +0200 Subject: [PATCH] when files get hydrated indirectly through pinning, sets correct state files that get downloaded not through an hydration request need to be converted to placeholder sets the expected state when converting them to placeholder files #3082 Signed-off-by: Matthieu Gallien --- src/libsync/vfs/cfapi/cfapiwrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/vfs/cfapi/cfapiwrapper.cpp b/src/libsync/vfs/cfapi/cfapiwrapper.cpp index dffd99b68996f..f191d3e6bdd99 100644 --- a/src/libsync/vfs/cfapi/cfapiwrapper.cpp +++ b/src/libsync/vfs/cfapi/cfapiwrapper.cpp @@ -699,7 +699,7 @@ OCC::Result OCC::CfApiWrapper::convertToPlaceholder(const FileHan const auto fileIdentity = QString::fromUtf8(fileId).toStdWString(); const auto fileIdentitySize = (fileIdentity.length() + 1) * sizeof(wchar_t); - const qint64 result = CfConvertToPlaceholder(handle.get(), fileIdentity.data(), sizeToDWORD(fileIdentitySize), CF_CONVERT_FLAG_NONE, nullptr, nullptr); + const qint64 result = CfConvertToPlaceholder(handle.get(), fileIdentity.data(), sizeToDWORD(fileIdentitySize), CF_CONVERT_FLAG_MARK_IN_SYNC, nullptr, nullptr); Q_ASSERT(result == S_OK); if (result != S_OK) { qCCritical(lcCfApiWrapper) << "Couldn't convert to placeholder" << pathForHandle(handle) << ":" << _com_error(result).ErrorMessage();