[ros-diffs] [weiden] 19842: get the root fcb when creating a file and no parent fcb is returned

weiden at svn.reactos.com weiden at svn.reactos.com
Sat Dec 3 19:16:07 CET 2005


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);
 		}
 	}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051203/c939bdd6/attachment.html


More information about the Ros-diffs mailing list