mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +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
|
@ -918,8 +918,15 @@ VfatCreateFile(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vfatFCBIsDirectory(pFcb))
|
if (!vfatFCBIsDirectory(pFcb))
|
||||||
|
{
|
||||||
|
if (RequestedDisposition == FILE_SUPERSEDE)
|
||||||
{
|
{
|
||||||
*pFcb->Attributes = Attributes & ~FILE_ATTRIBUTE_NORMAL;
|
*pFcb->Attributes = Attributes & ~FILE_ATTRIBUTE_NORMAL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*pFcb->Attributes |= Attributes & ~FILE_ATTRIBUTE_NORMAL;
|
||||||
|
}
|
||||||
*pFcb->Attributes |= FILE_ATTRIBUTE_ARCHIVE;
|
*pFcb->Attributes |= FILE_ATTRIBUTE_ARCHIVE;
|
||||||
VfatUpdateEntry(pFcb, vfatVolumeIsFatX(DeviceExt));
|
VfatUpdateEntry(pFcb, vfatVolumeIsFatX(DeviceExt));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue