Gunnar Dalsnes schrieb:
This problem prevents ros from deleting a file/directory (observed
while running wine kernel32 reg. tests with param "path")
around line 295 in vfat\finfo.c: (svn blame says Hartmut made the
last changes around here)
------------------------------------------------
if (DispositionInfo->DeleteFile)
{
if (MmFlushImageSection (FileObject->SectionObjectPointer,
MmFlushForDelete))
{
if (FCB->OpenHandleCount > 1)
{
DPRINT1("%d %x\n", FCB->OpenHandleCount,
CcGetFileObjectFromSectionPtrs(FileObject->SectionObjectPointer));
Status = STATUS_ACCESS_DENIED;
}
else
{
FCB->Flags |= FCB_DELETE_PENDING;
FileObject->DeletePending = TRUE;
}
}
else
{
------------------------------------------------
Why deny deletion with STATUS_ACCESS_DENIED if FCB->OpenHandleCount >
1 ??????
It is only possible to delete a file if the file is not mapped (as image
or data section) and if nobody else has open this file. The second
condition is the reason for the handle check. There exist one situation
for more than one handle. The file can be open with FILE_SHARE_DELETE.
Currently it is not implemented.
- Hartmut