From 41dc09b9a2d6da85969e0c8cdee3a2a41555e958 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 24 Feb 2023 16:37:21 +0100 Subject: [PATCH] with cfapi when dehydrating files add missing flag CF_UPDATE_FLAG_DEHYDRATE is apparently needed to get dehydration to always succeed Signed-off-by: Matthieu Gallien --- src/libsync/vfs/cfapi/cfapiwrapper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libsync/vfs/cfapi/cfapiwrapper.cpp b/src/libsync/vfs/cfapi/cfapiwrapper.cpp index e98d02792..059844395 100644 --- a/src/libsync/vfs/cfapi/cfapiwrapper.cpp +++ b/src/libsync/vfs/cfapi/cfapiwrapper.cpp @@ -806,7 +806,11 @@ OCC::Result OCC::CfApiWrapper::de const qint64 result = CfUpdatePlaceholder(handleForPath(path).get(), nullptr, fileIdentity.data(), sizeToDWORD(fileIdentitySize), - &dehydrationRange, 1, CF_UPDATE_FLAG_MARK_IN_SYNC, nullptr, nullptr); + &dehydrationRange, + 1, + CF_UPDATE_FLAG_MARK_IN_SYNC | CF_UPDATE_FLAG_DEHYDRATE, + nullptr, + nullptr); if (result != S_OK) { qCWarning(lcCfApiWrapper) << "Couldn't update placeholder info for" << path << ":" << QString::fromWCharArray(_com_error(result).ErrorMessage());