[FASTFAT]
authorEric Kohl <eric.kohl@reactos.org>
Tue, 10 Dec 2013 09:53:21 +0000 (09:53 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Tue, 10 Dec 2013 09:53:21 +0000 (09:53 +0000)
Set the archive attribute for new non-directory files.

svn path=/trunk/; revision=61258

reactos/drivers/filesystems/fastfat/create.c

index 738bc6a..486bf20 100644 (file)
@@ -551,6 +551,8 @@ VfatCreateFile(
             RequestedDisposition == FILE_SUPERSEDE)
         {
             Attributes = Stack->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL;
             RequestedDisposition == FILE_SUPERSEDE)
         {
             Attributes = Stack->Parameters.Create.FileAttributes & ~FILE_ATTRIBUTE_NORMAL;
+            if (!(RequestedOptions & FILE_DIRECTORY_FILE))
+                Attributes |= FILE_ATTRIBUTE_ARCHIVE;
             vfatSplitPathName(&PathNameU, NULL, &FileNameU);
             Status = VfatAddEntry(DeviceExt, &FileNameU, &pFcb, ParentFcb, RequestedOptions,
                                   (UCHAR)(Attributes & FILE_ATTRIBUTE_VALID_FLAGS));
             vfatSplitPathName(&PathNameU, NULL, &FileNameU);
             Status = VfatAddEntry(DeviceExt, &FileNameU, &pFcb, ParentFcb, RequestedOptions,
                                   (UCHAR)(Attributes & FILE_ATTRIBUTE_VALID_FLAGS));