James Hawkins : msi: Make sure read-only source files are set writable after being copied.

Alexandre Julliard julliard at winehq.org
Mon Sep 8 07:41:35 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Mon Sep  8 05:15:27 2008 -0500

msi: Make sure read-only source files are set writable after being copied.

---

 dlls/msi/files.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 0d9cd11..c2dcf84 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -131,13 +131,13 @@ static UINT copy_file(MSIFILE *file)
     BOOL ret;
 
     ret = CopyFileW(file->SourcePath, file->TargetPath, FALSE);
-    if (ret)
-    {
-        file->state = msifs_installed;
-        return ERROR_SUCCESS;
-    }
+    if (!ret)
+        return GetLastError();
 
-    return GetLastError();
+    SetFileAttributesW(file->TargetPath, FILE_ATTRIBUTE_NORMAL);
+
+    file->state = msifs_installed;
+    return ERROR_SUCCESS;
 }
 
 static UINT copy_install_file(MSIFILE *file)




More information about the wine-cvs mailing list