Commit in reactos/drivers/fs/vfat on MAIN
create.c+15-31.76 -> 1.77
fix broken ShareAccess set/update. makes 80+ wine regtests pass

reactos/drivers/fs/vfat
create.c 1.76 -> 1.77
diff -u -r1.76 -r1.77
--- create.c	5 Dec 2004 16:31:50 -0000	1.76
+++ create.c	6 Dec 2004 00:26:47 -0000	1.77
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: create.c,v 1.76 2004/12/05 16:31:50 gvg Exp $
+/* $Id: create.c,v 1.77 2004/12/06 00:26:47 gdalsnes Exp $
  *
  * PROJECT:          ReactOS kernel
  * FILE:             drivers/fs/vfat/create.c
@@ -731,12 +731,24 @@
 	}
     }
 
-  pFcb->OpenHandleCount++;
-  IoSetShareAccess(Stack->Parameters.Create.SecurityContext->DesiredAccess,
+  if (pFcb->OpenHandleCount == 0)
+  {
+      IoSetShareAccess(Stack->Parameters.Create.SecurityContext->DesiredAccess,
                    Stack->Parameters.Create.ShareAccess,
                    FileObject,
                    &pFcb->FCBShareAccess);
+   }
+   else
+   {
+      IoUpdateShareAccess(
+          FileObject,
+          &pFcb->FCBShareAccess
+         );
+      
+   }
 
+  pFcb->OpenHandleCount++;
+  
   /* FIXME : test write access if requested */
 
   return(Status);
CVSspam 0.2.8