From 045d817f4b7991c55cbec3789aa6c09ba2feb1a6 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 18 Jul 2006 12:51:31 +0100 Subject: [PATCH] msi: Create files with the correct file attributes. --- dlls/msi/files.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 534199f0cd..ba36a0d9d1 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -210,6 +210,7 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) HANDLE handle; LPWSTR file; MSIFILE *f; + DWORD attrs; file = strdupAtoW(pfdin->psz1); f = get_loaded_file(data->package, file); @@ -231,8 +232,11 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) TRACE("extracting %s\n", debugstr_w(f->TargetPath) ); + attrs = f->Attributes & (FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM); + if (!attrs) attrs = FILE_ATTRIBUTE_NORMAL; + handle = CreateFileW( f->TargetPath, GENERIC_READ | GENERIC_WRITE, 0, - NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); + NULL, CREATE_ALWAYS, attrs, NULL ); if ( handle == INVALID_HANDLE_VALUE ) { ERR("failed to create %s (error %ld)\n", -- 2.32.0.93.g670b81a890