From 02b443855b7032f758c6bf253cbd6a14d4d2c464 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 10 Dec 2013 18:48:55 +0000 Subject: [PATCH] [FASTFAT] Set the archive attribute for opened non-directory files in overwrite or supersede mode. svn path=/trunk/; revision=61259 --- reactos/drivers/filesystems/fastfat/create.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reactos/drivers/filesystems/fastfat/create.c b/reactos/drivers/filesystems/fastfat/create.c index 486bf20c5af..70924a5882e 100644 --- a/reactos/drivers/filesystems/fastfat/create.c +++ b/reactos/drivers/filesystems/fastfat/create.c @@ -694,6 +694,13 @@ VfatCreateFile( RequestedDisposition == FILE_OVERWRITE_IF || RequestedDisposition == FILE_SUPERSEDE) { + if (!(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY)) + { + *pFcb->Attributes = Stack->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL; + *pFcb->Attributes |= FILE_ATTRIBUTE_ARCHIVE; + VfatUpdateEntry(pFcb); + } + ExAcquireResourceExclusiveLite(&(pFcb->MainResource), TRUE); Status = VfatSetAllocationSizeInformation(FileObject, pFcb,