dotnet: implement new Delete design and POSIX semantics

This commit is contained in:
Bill Zissimopoulos
2021-10-20 12:23:14 +01:00
parent 81248f3899
commit 76bfa395a8
6 changed files with 187 additions and 54 deletions

View File

@ -998,11 +998,20 @@ FSP_API NTSTATUS FspFileSystemOpCleanup(FSP_FILE_SYSTEM *FileSystem,
if (Request->Req.Cleanup.Delete && 0 != FileSystem->Interface->Delete)
{
FileSystem->Interface->Delete(FileSystem,
NTSTATUS Result = FileSystem->Interface->Delete(FileSystem,
(PVOID)ValOfFileContext(Request->Req.Cleanup),
0 != Request->FileName.Size ? (PWSTR)Request->Buffer : 0,
(ULONG)-1);
CleanupFlags &= ~FspCleanupDelete;
/*
* If Delete returns STATUS_NOT_IMPLEMENTED it means that it is unable
* to handle file deletion during the Cleanup phase. In this case we
* will handle file deletion in Cleanup with the FspCleanupDelete flag.
*
* This is necessary for file systems like the .NET layer where Delete
* may be implemented but unable to handle all file deletion cases.
*/
if (STATUS_NOT_IMPLEMENTED != Result)
CleanupFlags &= ~FspCleanupDelete;
}
if (0 != FileSystem->Interface->Cleanup)