Author: ekohl
Date: Fri May 17 17:52:43 2013
New Revision: 59026
URL:
http://svn.reactos.org/svn/reactos?rev=59026&view=rev
Log:
[FASTFAT]
Reverted revisions 59023, 59022 and 58976.
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] Fri May 17 17:52:43
2013
@@ -426,7 +426,6 @@
BOOLEAN Dots;
UNICODE_STRING FileNameU;
UNICODE_STRING PathNameU;
- ULONG Attributes;
/* Unpack the various parameters. */
Stack = IoGetCurrentIrpStackLocation (Irp);
@@ -437,9 +436,6 @@
FileObject = Stack->FileObject;
DeviceExt = DeviceObject->DeviceExtension;
- Attributes = Stack->Parameters.Create.FileAttributes;
- Attributes &= (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN |
FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE);
-
/* Check their validity. */
if (RequestedOptions & FILE_DIRECTORY_FILE &&
RequestedDisposition == FILE_SUPERSEDE)
@@ -548,9 +544,11 @@
RequestedDisposition == FILE_OVERWRITE_IF ||
RequestedDisposition == FILE_SUPERSEDE)
{
+ ULONG Attributes;
+ Attributes = Stack->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL;
vfatSplitPathName(&PathNameU, NULL, &FileNameU);
Status = VfatAddEntry (DeviceExt, &FileNameU, &pFcb, ParentFcb,
RequestedOptions,
- (UCHAR)(Attributes | FILE_ATTRIBUTE_ARCHIVE));
+ (UCHAR)(Attributes & FILE_ATTRIBUTE_VALID_FLAGS));
vfatReleaseFCB (DeviceExt, ParentFcb);
if (NT_SUCCESS (Status))
{
@@ -690,12 +688,6 @@
RequestedDisposition == FILE_SUPERSEDE)
{
ExAcquireResourceExclusiveLite(&(pFcb->MainResource),
TRUE);
- if (RequestedDisposition == FILE_OVERWRITE ||
- RequestedDisposition == FILE_OVERWRITE_IF)
- *pFcb->Attributes |= (Attributes | FILE_ATTRIBUTE_ARCHIVE);
- else
- *pFcb->Attributes = (Attributes | FILE_ATTRIBUTE_ARCHIVE);
-
Status = VfatSetAllocationSizeInformation (FileObject,
pFcb,
DeviceExt,