From b097d7ad0e638d255c85c2a38021b482e0826d65 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 26 Feb 2017 18:46:30 +0000 Subject: [PATCH] [FASTFAT] Finally fix a commented out check regarding directory type while opening a FAT volume svn path=/trunk/; revision=73966 --- reactos/drivers/filesystems/fastfat/create.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/filesystems/fastfat/create.c b/reactos/drivers/filesystems/fastfat/create.c index 52b5c74ca6c..96f9a1865c2 100644 --- a/reactos/drivers/filesystems/fastfat/create.c +++ b/reactos/drivers/filesystems/fastfat/create.c @@ -450,13 +450,12 @@ VfatCreateFile( { 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) + + if (BooleanFlagOn(RequestedOptions, FILE_DIRECTORY_FILE) && + (FileObject->RelatedFileObject == NULL || FileObject->RelatedFileObject->FsContext2 == NULL || FileObject->RelatedFileObject->FsContext == DeviceExt->VolumeFcb)) { return STATUS_NOT_A_DIRECTORY; } -#endif if (OpenTargetDir) {