Don't check the share access for directories.
[reactos.git] / reactos / drivers / fs / vfat / cleanup.c
index db2cccc..c56f4fb 100644 (file)
@@ -75,7 +75,10 @@ VfatCleanupFile(PVFAT_IRP_CONTEXT IrpContext)
      CcUninitializeCacheMap (FileObject, NULL, NULL);
 #endif
      pFcb->OpenHandleCount--;
-     IoRemoveShareAccess(FileObject, &pFcb->FCBShareAccess);
+     if (!(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY))
+       {
+         IoRemoveShareAccess(FileObject, &pFcb->FCBShareAccess);
+       }
     }
   return STATUS_SUCCESS;
 }