Thomas Faber : msi: Use the intended attributes when overwriting the target file in cabinet_copy_file.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 29 15:49:00 CST 2015


Module: wine
Branch: master
Commit: 689f04849737433e282d19b535e8dcc819061138
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=689f04849737433e282d19b535e8dcc819061138

Author: Thomas Faber <thomas.faber at reactos.org>
Date:   Mon Nov 23 14:00:54 2015 +0100

msi: Use the intended attributes when overwriting the target file in cabinet_copy_file.

Signed-off-by: Thomas Faber <thomas.faber at reactos.org>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msi/media.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index d75f59f..1357a64 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -476,7 +476,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
         {
             TRACE("removing read-only attribute on %s\n", debugstr_w(path));
             SetFileAttributesW( path, attrs2 & ~FILE_ATTRIBUTE_READONLY );
-            handle = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, attrs2, NULL);
+            handle = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, attrs, NULL);
 
             if (handle != INVALID_HANDLE_VALUE) goto done;
             err = GetLastError();




More information about the wine-cvs mailing list