James Hawkins : msi: Use the file' s component instead of passing an extra parameter to set_file_source.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 8 06:43:20 CST 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Tue Nov  7 15:09:58 2006 -0800

msi: Use the file's component instead of passing an extra parameter to set_file_source.

---

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

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 8d3338c..3b6b2a9 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -335,13 +335,12 @@ static BOOL extract_cabinet_file(MSIPACK
     return ret;
 }
 
-static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, MSICOMPONENT*
-        comp, LPCWSTR path)
+static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, LPCWSTR path)
 {
     if (!file->IsCompressed)
     {
         LPWSTR p, path;
-        p = resolve_folder(package, comp->Directory, TRUE, FALSE, NULL);
+        p = resolve_folder(package, file->Component->Directory, TRUE, FALSE, NULL);
         path = build_directory_name(2, p, file->ShortName);
         if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
         {
@@ -466,7 +465,7 @@ static UINT ready_media_for_file( MSIPAC
 
     if (file->Sequence <= mi->last_sequence)
     {
-        set_file_source(package,file,comp,mi->last_path);
+        set_file_source(package, file, mi->last_path);
         TRACE("Media already ready (%u, %u)\n",file->Sequence,mi->last_sequence);
         return ERROR_SUCCESS;
     }
@@ -488,7 +487,7 @@ static UINT ready_media_for_file( MSIPAC
     if (!file->IsCompressed)
     {
         mi->last_path = resolve_folder(package, comp->Directory, TRUE, FALSE, NULL);
-        set_file_source(package,file,comp,mi->last_path);
+        set_file_source(package, file, mi->last_path);
 
         MsiSourceListAddMediaDiskW(package->ProductCode, NULL, 
             MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, mi->count, volume,
@@ -592,7 +591,7 @@ static UINT ready_media_for_file( MSIPAC
                     MSICODE_PRODUCT|MSISOURCETYPE_MEDIA,
                     INSTALLPROPERTY_LASTUSEDSOURCEW, mi->last_path);
     }
-    set_file_source(package, file, comp, mi->last_path);
+    set_file_source(package, file, mi->last_path);
 
     MsiSourceListAddMediaDiskW(package->ProductCode, NULL,
             MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, mi->count, volume,




More information about the wine-cvs mailing list