mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[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. svn path=/trunk/; revision=58976
This commit is contained in:
@@ -545,11 +545,12 @@ VfatCreateFile ( PDEVICE_OBJECT DeviceObject, PIRP Irp )
|
||||
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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user