projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3fecf9
)
[FASTFAT] When overwriting a file with FILE_OVERWRITE*, don't erase previous file...
author
Pierre Schweitzer
<pierre@reactos.org>
Mon, 1 Jan 2018 13:29:15 +0000
(14:29 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Mon, 1 Jan 2018 13:29:15 +0000
(14:29 +0100)
Keep erasing them in case the file gets overwritten with FILE_SUPERSEDE.
CORE-14158
drivers/filesystems/fastfat/create.c
patch
|
blob
|
history
diff --git
a/drivers/filesystems/fastfat/create.c
b/drivers/filesystems/fastfat/create.c
index
89ac5e0
..
49c5420
100644
(file)
--- a/
drivers/filesystems/fastfat/create.c
+++ b/
drivers/filesystems/fastfat/create.c
@@
-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));
}