msi: MsiDatabaseCommit also succeeds for a a readonly database.
This commit is contained in:
parent
5f46f701c5
commit
20bdf059ab
|
@ -831,6 +831,12 @@ UINT WINAPI MsiDatabaseCommit( MSIHANDLE hdb )
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (db->mode == MSIDBOPEN_READONLY)
|
||||||
|
{
|
||||||
|
msiobj_release( &db->hdr );
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: lock the database */
|
/* FIXME: lock the database */
|
||||||
|
|
||||||
r = MSI_CommitTables( db );
|
r = MSI_CommitTables( db );
|
||||||
|
|
|
@ -96,6 +96,9 @@ static void test_msidatabase(void)
|
||||||
res = MsiOpenDatabase( msifile, MSIDBOPEN_READONLY, &hdb );
|
res = MsiOpenDatabase( msifile, MSIDBOPEN_READONLY, &hdb );
|
||||||
ok( res == ERROR_SUCCESS , "Failed to open database\n" );
|
ok( res == ERROR_SUCCESS , "Failed to open database\n" );
|
||||||
|
|
||||||
|
res = MsiDatabaseCommit( hdb );
|
||||||
|
ok( res == ERROR_SUCCESS , "Failed to commit database\n" );
|
||||||
|
|
||||||
res = MsiCloseHandle( hdb );
|
res = MsiCloseHandle( hdb );
|
||||||
ok( res == ERROR_SUCCESS , "Failed to close database\n" );
|
ok( res == ERROR_SUCCESS , "Failed to close database\n" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue