Huw Davies : msi: Create files with the correct file attributes.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 19 04:02:33 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 045d817f4b7991c55cbec3789aa6c09ba2feb1a6
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=045d817f4b7991c55cbec3789aa6c09ba2feb1a6
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Jul 18 12:51:31 2006 +0100
msi: Create files with the correct file attributes.
---
dlls/msi/files.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 534199f..ba36a0d 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -210,6 +210,7 @@ static INT_PTR cabinet_notify(FDINOTIFIC
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(FDINOTIFIC
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",
More information about the wine-cvs
mailing list