get the root fcb when creating a file and no parent fcb is returned

svn path=/trunk/; revision=19842
This commit is contained in:
Thomas Bluemel 2005-12-03 18:16:02 +00:00
parent b746a9f60a
commit 94fc07e5fa

View file

@ -564,6 +564,11 @@ VfatCreateFile ( PDEVICE_OBJECT DeviceObject, PIRP Irp )
RequestedDisposition == FILE_SUPERSEDE)
{
ULONG Attributes;
if (ParentFcb == NULL)
{
ParentFcb = vfatOpenRootFCB (DeviceExt);
ASSERT(ParentFcb != NULL);
}
Attributes = Stack->Parameters.Create.FileAttributes;
vfatSplitPathName(&PathNameU, NULL, &FileNameU);
@ -600,7 +605,10 @@ VfatCreateFile ( PDEVICE_OBJECT DeviceObject, PIRP Irp )
}
else
{
vfatReleaseFCB (DeviceExt, ParentFcb);
if (ParentFcb)
{
vfatReleaseFCB (DeviceExt, ParentFcb);
}
return(Status);
}
}