mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[FASTFAT] When overwriting a file with FILE_OVERWRITE*, don't erase previous file attributes, only update them.
Keep erasing them in case the file gets overwritten with FILE_SUPERSEDE. CORE-14158
This commit is contained in:
parent
f3fecf92c1
commit
2b4d5c5cff
1 changed files with 8 additions and 1 deletions
|
@ -919,7 +919,14 @@ VfatCreateFile(
|
|||
|
||||
if (!vfatFCBIsDirectory(pFcb))
|
||||
{
|
||||
*pFcb->Attributes = Attributes & ~FILE_ATTRIBUTE_NORMAL;
|
||||
if (RequestedDisposition == FILE_SUPERSEDE)
|
||||
{
|
||||
*pFcb->Attributes = Attributes & ~FILE_ATTRIBUTE_NORMAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pFcb->Attributes |= Attributes & ~FILE_ATTRIBUTE_NORMAL;
|
||||
}
|
||||
*pFcb->Attributes |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
VfatUpdateEntry(pFcb, vfatVolumeIsFatX(DeviceExt));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue