Commit 689f0484 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

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

parent 64935d61
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment