Commit ea2c96c5 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add the ability to deformat the component's source.

parent f5c2806c
...@@ -113,16 +113,17 @@ static LPWSTR deformat_component(MSIPACKAGE* package, LPCWSTR key, DWORD* sz) ...@@ -113,16 +113,17 @@ static LPWSTR deformat_component(MSIPACKAGE* package, LPCWSTR key, DWORD* sz)
{ {
LPWSTR value = NULL; LPWSTR value = NULL;
MSICOMPONENT *comp; MSICOMPONENT *comp;
BOOL source;
*sz = 0; *sz = 0;
if (!package) if (!package)
return NULL; return NULL;
FIXME("component key %s\n", debugstr_w(key));
comp = get_loaded_component(package,key); comp = get_loaded_component(package,key);
if (comp) 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); *sz = (strlenW(value)) * sizeof(WCHAR);
} }
......
...@@ -2236,10 +2236,7 @@ static void test_formatrecord_tables(void) ...@@ -2236,10 +2236,7 @@ static void test_formatrecord_tables(void)
MsiRecordSetString( hrec, 1, "[$parietal]" ); MsiRecordSetString( hrec, 1, "[$parietal]" );
r = MsiFormatRecord( hpkg, hrec, buf, &size ); r = MsiFormatRecord( hpkg, hrec, buf, &size );
ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); 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" ); DeleteFile( "C:\\I am a really long directory\\temporal.txt" );
RemoveDirectory( "C:\\I am a really long directory" ); RemoveDirectory( "C:\\I am a really long directory" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment