Don't check the share access for directories.
Modified: trunk/reactos/drivers/fs/vfat/cleanup.c
Modified: trunk/reactos/drivers/fs/vfat/create.c

Modified: trunk/reactos/drivers/fs/vfat/cleanup.c
--- trunk/reactos/drivers/fs/vfat/cleanup.c	2005-09-18 12:05:57 UTC (rev 17909)
+++ trunk/reactos/drivers/fs/vfat/cleanup.c	2005-09-18 13:10:43 UTC (rev 17910)
@@ -75,7 +75,10 @@
      CcUninitializeCacheMap (FileObject, NULL, NULL);
 #endif
      pFcb->OpenHandleCount--;
-     IoRemoveShareAccess(FileObject, &pFcb->FCBShareAccess);
+     if (!(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY))
+       {
+         IoRemoveShareAccess(FileObject, &pFcb->FCBShareAccess);
+       }
     }
   return STATUS_SUCCESS;
 }

Modified: trunk/reactos/drivers/fs/vfat/create.c
--- trunk/reactos/drivers/fs/vfat/create.c	2005-09-18 12:05:57 UTC (rev 17909)
+++ trunk/reactos/drivers/fs/vfat/create.c	2005-09-18 13:10:43 UTC (rev 17910)
@@ -612,7 +612,8 @@
 
       pFcb = FileObject->FsContext;
 
-      if (pFcb->OpenHandleCount != 0)
+      if (pFcb->OpenHandleCount != 0 &&
+          !(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY))
         {
           Status = IoCheckShareAccess(Stack->Parameters.Create.SecurityContext->DesiredAccess,
                                       Stack->Parameters.Create.ShareAccess,
@@ -708,7 +709,8 @@
 	}
     }
 
-  if (pFcb->OpenHandleCount == 0)
+  if (pFcb->OpenHandleCount == 0 &&
+      !(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY))
   {
       IoSetShareAccess(Stack->Parameters.Create.SecurityContext->DesiredAccess,
                    Stack->Parameters.Create.ShareAccess,