Commit 20d98e81 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Use msi_dialog_dup_property where appropriate.

parent 2a09d4f6
......@@ -1396,18 +1396,14 @@ static LPWSTR msi_get_window_text( HWND hwnd )
static UINT msi_dialog_pathedit_handler( msi_dialog *dialog,
msi_control *control, WPARAM param )
{
LPCWSTR prop;
LPWSTR buf, indirect = NULL;
LPWSTR buf, prop;
BOOL indirect;
if( HIWORD(param) != EN_KILLFOCUS )
return ERROR_SUCCESS;
prop = control->property;
if ( control->attributes & msidbControlAttributesIndirect )
{
indirect = msi_dup_property( dialog->package, control->property );
prop = indirect;
}
indirect = control->attributes & msidbControlAttributesIndirect;
prop = msi_dialog_dup_property( dialog, control->property, indirect );
/* FIXME: verify the new path */
buf = msi_get_window_text( control->hwnd );
......@@ -1417,7 +1413,7 @@ static UINT msi_dialog_pathedit_handler( msi_dialog *dialog,
debugstr_w(prop));
msi_free( buf );
msi_free( indirect );
msi_free( prop );
return ERROR_SUCCESS;
}
......@@ -1449,10 +1445,8 @@ static UINT msi_dialog_pathedit_control( msi_dialog *dialog, MSIRECORD *rec )
WS_BORDER | WS_TABSTOP );
control->handler = msi_dialog_pathedit_handler;
control->attributes = MSI_RecordGetInteger( rec, 8 );
prop = MSI_RecordGetString( rec, 9 );
if ( prop )
control->property = strdupW( prop );
control->property = msi_dialog_dup_property( dialog, prop, FALSE );
msi_dialog_update_pathedit( dialog );
......
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