msi: Add a non-persistent string instead of a persistent one if the table or row is non-persistent.

This commit is contained in:
Rob Shearman 2007-04-23 08:27:37 +01:00 committed by Alexandre Julliard
parent 697d820eee
commit e474304160
1 changed files with 6 additions and 1 deletions

View File

@ -1250,10 +1250,14 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
for ( i = 0; i < tv->num_cols; i++ )
{
BOOL persistent;
/* only update the fields specified in the mask */
if ( !(mask&(1<<i)) )
continue;
/* if row >= tv->table->row_count then it is a non-persistent row */
persistent = tv->table->persistent && (row < tv->table->row_count);
/* FIXME: should we allow updating keys? */
val = 0;
@ -1266,7 +1270,8 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
else if ( tv->columns[i].type & MSITYPE_STRING )
{
LPCWSTR sval = MSI_RecordGetString( rec, i + 1 );
val = msi_addstringW( tv->db->strings, 0, sval, -1, 1, StringPersistent );
val = msi_addstringW( tv->db->strings, 0, sval, -1, 1,
persistent ? StringPersistent : StringNonPersistent );
}
else if ( 2 == bytes_per_column( &tv->columns[ i ] ) )
{