James Hawkins : msi: Use the TargetPath of a file if the file doesn' t exist in MsiFormatRecord.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 7 07:12:33 CDT 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Tue Sep  5 20:28:15 2006 -0700

msi: Use the TargetPath of a file if the file doesn't exist in MsiFormatRecord.

---

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

diff --git a/dlls/msi/format.c b/dlls/msi/format.c
index 6dc92f9..2909089 100644
--- a/dlls/msi/format.c
+++ b/dlls/msi/format.c
@@ -165,8 +165,8 @@ static LPWSTR deformat_file(MSIPACKAGE* 
             {
                 ERR("Unable to get ShortPath size (%s)\n",
                     debugstr_w( file->TargetPath) );
-                value = NULL;
-                *sz = 0;
+                value = strdupW( file->TargetPath );
+                *sz = (lstrlenW(value)) * sizeof(WCHAR);
             }
         }
     }
diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c
index c9f9bc3..e56b457 100644
--- a/dlls/msi/tests/format.c
+++ b/dlls/msi/tests/format.c
@@ -1804,11 +1804,8 @@ static void test_formatrecord_tables(voi
     MsiRecordSetString( hrec, 1, "[!temporal_file]" );
     r = MsiFormatRecord( hpkg, hrec, buf, &size );
     ok( r == ERROR_SUCCESS, "format record failed: %d\n", r);
-    todo_wine
-    {
-        ok( !lstrcmp( buf, "1: C:\\I am a really long directory\\temporal.txt " ),
-            "Expected '1: C:\\I am a really long directory\\temporal.txt ', got %s\n", buf);
-    }
+    ok( !lstrcmp( buf, "1: C:\\I am a really long directory\\temporal.txt " ),
+        "Expected '1: C:\\I am a really long directory\\temporal.txt ', got %s\n", buf);
 
     /* custom action 51, files don't exist */
     r = MsiDoAction( hpkg, "MyCustom" );
@@ -1817,11 +1814,8 @@ static void test_formatrecord_tables(voi
     size = MAX_PATH;
     r = MsiGetProperty( hpkg, "prop", buf, &size );
     ok( r == ERROR_SUCCESS, "get property failed: %d\n", r);
-    todo_wine
-    {
-        ok( !lstrcmp( buf, "C:\\I am a really long directory\\temporal.txt" ),
-            "Expected 'C:\\I am a really long directory\\temporal.txt', got %s\n", buf);
-    }
+    ok( !lstrcmp( buf, "C:\\I am a really long directory\\temporal.txt" ),
+        "Expected 'C:\\I am a really long directory\\temporal.txt', got %s\n", buf);
 
     CreateDirectory( "C:\\I am a really long directory", NULL );
     create_test_file( "C:\\I am a really long directory\\temporal.txt" );




More information about the wine-cvs mailing list