msi [2/2]: Add the ability to deformat the component's source

James Hawkins truiken at gmail.com
Thu May 24 13:11:20 CDT 2007


Hi,

Changelog:
* Add the ability to deformat the component's source.

 dlls/msi/format.c       |    5 +++--
 dlls/msi/tests/format.c |    5 +----
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/format.c b/dlls/msi/format.c
index fa85e60..1bcfa6e 100644
--- a/dlls/msi/format.c
+++ b/dlls/msi/format.c
@@ -113,16 +113,17 @@ static LPWSTR deformat_component(MSIPACK
 {
     LPWSTR value = NULL;
     MSICOMPONENT *comp;
+    BOOL source;
 
     *sz = 0;
     if (!package)
         return NULL;
 
-    FIXME("component key %s\n", debugstr_w(key));
     comp = get_loaded_component(package,key);
     if (comp)
     {
-        value = resolve_folder(package, comp->Directory, FALSE, FALSE, TRUE, NULL);
+        source = (comp->Action == INSTALLSTATE_SOURCE) ? TRUE : FALSE;
+        value = resolve_folder(package, comp->Directory, source, FALSE, TRUE, NULL);
         *sz = (strlenW(value)) * sizeof(WCHAR);
     }
 
diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c
index 16661e3..23438bb 100644
--- a/dlls/msi/tests/format.c
+++ b/dlls/msi/tests/format.c
@@ -2236,10 +2236,7 @@ static void test_formatrecord_tables(voi
     MsiRecordSetString( hrec, 1, "[$parietal]" );
     r = MsiFormatRecord( hpkg, hrec, buf, &size );
     ok( r == ERROR_SUCCESS, "format record failed: %d\n", r);
-    todo_wine
-    {
-        ok( !lstrcmp( buf, expected ), "Expected '%s', got %s\n", expected, buf);
-    }
+    ok( !lstrcmp( buf, expected ), "Expected '%s', got %s\n", expected, buf);
 
     DeleteFile( "C:\\I am a really long directory\\temporal.txt" );
     RemoveDirectory( "C:\\I am a really long directory" );
-- 
1.4.1


More information about the wine-patches mailing list