Author: pschweitzer
Date: Sun Feb 26 18:46:30 2017
New Revision: 73966
URL:
http://svn.reactos.org/svn/reactos?rev=73966&view=rev
Log:
[FASTFAT]
Finally fix a commented out check regarding directory type while opening a FAT volume
Modified:
trunk/reactos/drivers/filesystems/fastfat/create.c
Modified: trunk/reactos/drivers/filesystems/fastfat/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Sun Feb 26 18:46:30
2017
@@ -450,13 +450,12 @@
{
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)
{