get the root fcb when creating a file and no parent fcb is returned
Modified: trunk/reactos/drivers/fs/vfat/create.c
_____
Modified: trunk/reactos/drivers/fs/vfat/create.c
--- trunk/reactos/drivers/fs/vfat/create.c 2005-12-03 17:33:41 UTC
(rev 19841)
+++ trunk/reactos/drivers/fs/vfat/create.c 2005-12-03 18:16:02 UTC
(rev 19842)
@@ -564,6 +564,11 @@
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 @@
}
else
{
- vfatReleaseFCB (DeviceExt, ParentFcb);
+ if (ParentFcb)
+ {
+ vfatReleaseFCB (DeviceExt, ParentFcb);
+ }
return(Status);
}
}