From 94c9f4008f490fc6ec3419bbc261840416569be7 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 10 Aug 2010 20:08:31 +0000 Subject: [PATCH] [FASTFAT] Pierre Schweitzer - Fix volume opening on FAT volume. Commented out a directory check as it doesn't match realized tests, in spite of what's in WDK. svn path=/trunk/; revision=48513 --- reactos/drivers/filesystems/fastfat/create.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/fastfat/create.c b/reactos/drivers/filesystems/fastfat/create.c index 07b6dc074d3..f643104c947 100644 --- a/reactos/drivers/filesystems/fastfat/create.c +++ b/reactos/drivers/filesystems/fastfat/create.c @@ -466,7 +466,7 @@ VfatCreateFile ( PDEVICE_OBJECT DeviceObject, PIRP Irp ) /* This a open operation for the volume itself */ if (FileObject->FileName.Length == 0 && - FileObject->RelatedFileObject == NULL) + (FileObject->RelatedFileObject == NULL || FileObject->RelatedFileObject->FsContext2 != NULL)) { if (RequestedDisposition == FILE_CREATE || RequestedDisposition == FILE_OVERWRITE_IF || @@ -474,10 +474,13 @@ VfatCreateFile ( PDEVICE_OBJECT DeviceObject, PIRP Irp ) { return(STATUS_ACCESS_DENIED); } +#if 0 + /* In spite of what is shown in WDK, it seems that Windows FAT driver doesn't perform that test */ if (RequestedOptions & FILE_DIRECTORY_FILE) { return(STATUS_NOT_A_DIRECTORY); } +#endif pFcb = DeviceExt->VolumeFcb; pCcb = ExAllocateFromNPagedLookasideList(&VfatGlobalData->CcbLookasideList); if (pCcb == NULL)