question

WebDAV-4685 avatar image
0 Votes"
WebDAV-4685 asked XiaopoYang-MSFT answered

Cloud Filter API Delete callback deletes a file regardless of the CompletionStatus code

I am trying to implement CF_CALLBACK_TYPE_NOTIFY_DELETE callback in Cloud Filter API. Whatever error code I return from the delete callback the placeholder is always deleted. This issue appeared in the recent Windows update 21H1. It was working properly on the previous Windows versions.

The expected behaviour is:
If the file fails to delete in my remote storage, I set the error code in CompletionStatus and the placeholder is NOT deleted in the client file system.


Here is my code:

 void CALLBACK FakeCloudProvider::OnNotifyDelete(
     _In_ CONST CF_CALLBACK_INFO* callbackInfo,
     _In_ CONST CF_CALLBACK_PARAMETERS* callbackParameters)
 {
     CF_OPERATION_INFO opInfo = { 0 };
        
     opInfo.StructSize = sizeof(CF_OPERATION_INFO);
     opInfo.Type = CF_OPERATION_TYPE_ACK_DELETE;
     opInfo.ConnectionKey = callbackInfo->ConnectionKey;
     opInfo.TransferKey = callbackInfo->TransferKey;
     opInfo.CorrelationVector = callbackInfo->CorrelationVector;
     opInfo.RequestKey = callbackInfo->RequestKey;
        
     CF_OPERATION_PARAMETERS params = {0};
     params.ParamSize = sizeof(CF_OPERATION_PARAMETERS);
     params.AckDelete.Flags = CF_OPERATION_ACK_DELETE_FLAG_NONE;
    
     // Whatever code I set here the file is always deleted
     params.AckDelete.CompletionStatus = STATUS_IO_DEVICE_ERROR; 
        
     HRESULT res = CfExecute(&opInfo, &params);
 }


windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered

According to the Question, This does be a bug.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.