[FASTFAT]

Implement a special case for existing files which are opened using the FILE_OVERWRITE or FILE_OVERWRITE_IF file disposition: New file attributes must be ORed with the existing file attributes.

svn path=/trunk/; revision=59023
This commit is contained in:
Eric Kohl 2013-05-16 23:41:43 +00:00
parent a6b8f0a353
commit 1bb724b8c5

View file

@ -690,7 +690,11 @@ VfatCreateFile ( PDEVICE_OBJECT DeviceObject, PIRP Irp )
RequestedDisposition == FILE_SUPERSEDE)
{
ExAcquireResourceExclusiveLite(&(pFcb->MainResource), TRUE);
*pFcb->Attributes = Attributes | FILE_ATTRIBUTE_ARCHIVE;
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,