From df54ba30b7f26c6b07f71e1b2ed44a5b1fcb4e9a 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 e98d027925b39..059844395a0b4 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());