/* If that's a directory or a read-only file, we're not allowed */
if (vfatFCBIsDirectory(TargetFcb) || ((*TargetFcb->Attributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY));
{
+ vfatReleaseFCB(DeviceExt, *ParentFCB);
*ParentFCB = NULL;
vfatReleaseFCB(DeviceExt, TargetFcb);
return STATUS_OBJECT_NAME_COLLISION;
/* Attempt to flush (might close the file) */
if (!MmFlushImageSection(TargetFcb->FileObject->SectionObjectPointer, MmFlushForDelete))
{
+ vfatReleaseFCB(DeviceExt, *ParentFCB);
*ParentFCB = NULL;
vfatReleaseFCB(DeviceExt, TargetFcb);
return STATUS_ACCESS_DENIED;
/* If we are, ensure the file isn't open by anyone! */
if (TargetFcb->OpenHandleCount != 0)
{
+ vfatReleaseFCB(DeviceExt, *ParentFCB);
*ParentFCB = NULL;
vfatReleaseFCB(DeviceExt, TargetFcb);
return STATUS_ACCESS_DENIED;
}
else
{
+ vfatReleaseFCB(DeviceExt, *ParentFCB);
*ParentFCB = NULL;
vfatReleaseFCB(DeviceExt, TargetFcb);
return STATUS_OBJECT_NAME_COLLISION;