James Hawkins : msi: Copy the assembly file directly if it's not compressed .

Alexandre Julliard julliard at winehq.org
Wed May 14 06:43:41 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Tue May 13 18:24:48 2008 -0500

msi: Copy the assembly file directly if it's not compressed.

---

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

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 0c5306c..9d8198b 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5659,15 +5659,30 @@ static UINT ITERATE_PublishAssembly( MSIRECORD *rec, LPVOID param )
     file = msi_find_file(package, comp->KeyPath);
 
     GetTempPathW(MAX_PATH, path);
-    r = msi_extract_file(package, file, path);
-    if (r != ERROR_SUCCESS)
+
+    if (file->IsCompressed)
     {
-        ERR("Failed to extract temporary assembly\n");
-        return r;
+        r = msi_extract_file(package, file, path);
+        if (r != ERROR_SUCCESS)
+        {
+            ERR("Failed to extract temporary assembly\n");
+            return r;
+        }
+
+        PathAddBackslashW(path);
+        lstrcatW(path, file->FileName);
     }
+    else
+    {
+        PathAddBackslashW(path);
+        lstrcatW(path, file->FileName);
 
-    PathAddBackslashW(path);
-    lstrcatW(path, file->FileName);
+        if (!CopyFileW(file->SourcePath, path, FALSE))
+        {
+            ERR("Failed to copy temporary assembly: %d\n", GetLastError());
+            return ERROR_FUNCTION_FAILED;
+        }
+    }
 
     r = install_assembly(path);
     if (r != ERROR_SUCCESS)




More information about the wine-cvs mailing list