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

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Thomas Faber 2015-11-23 14:00:54 +01:00 committed by Alexandre Julliard
parent 64935d61d9
commit 689f048497
1 changed files with 1 additions and 1 deletions

View File

@ -476,7 +476,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
{ {
TRACE("removing read-only attribute on %s\n", debugstr_w(path)); TRACE("removing read-only attribute on %s\n", debugstr_w(path));
SetFileAttributesW( path, attrs2 & ~FILE_ATTRIBUTE_READONLY ); 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; if (handle != INVALID_HANDLE_VALUE) goto done;
err = GetLastError(); err = GetLastError();