mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 01:12:58 -05:00
dotnet: implement new Delete design and POSIX semantics
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user