Author: ekohl Date: Thu May 9 15:03:51 2013 New Revision: 58976
URL: http://svn.reactos.org/svn/reactos?rev=58976&view=rev Log: [FASTFAT] Allow only readonly, hidden, system and archive files attributes to be set for a new file. Other file attributes must be ignored. This fixes several tests.
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/fastfat... ============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Thu May 9 15:03:51 2013 @@ -545,11 +545,12 @@ RequestedDisposition == FILE_SUPERSEDE) { ULONG Attributes; - Attributes = Stack->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL; + Attributes = Stack->Parameters.Create.FileAttributes; + Attributes &= (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE);
vfatSplitPathName(&PathNameU, NULL, &FileNameU); Status = VfatAddEntry (DeviceExt, &FileNameU, &pFcb, ParentFcb, RequestedOptions, - (UCHAR)(Attributes & FILE_ATTRIBUTE_VALID_FLAGS)); + (UCHAR)(Attributes | FILE_ATTRIBUTE_ARCHIVE)); vfatReleaseFCB (DeviceExt, ParentFcb); if (NT_SUCCESS (Status)) {