Commit 20bdf059 authored by Bernhard Loos's avatar Bernhard Loos Committed by Alexandre Julliard

msi: MsiDatabaseCommit also succeeds for a a readonly database.

parent 5f46f701
......@@ -831,6 +831,12 @@ UINT WINAPI MsiDatabaseCommit( MSIHANDLE hdb )
return ERROR_SUCCESS;
}
if (db->mode == MSIDBOPEN_READONLY)
{
msiobj_release( &db->hdr );
return ERROR_SUCCESS;
}
/* FIXME: lock the database */
r = MSI_CommitTables( db );
......
......@@ -96,6 +96,9 @@ static void test_msidatabase(void)
res = MsiOpenDatabase( msifile, MSIDBOPEN_READONLY, &hdb );
ok( res == ERROR_SUCCESS , "Failed to open database\n" );
res = MsiDatabaseCommit( hdb );
ok( res == ERROR_SUCCESS , "Failed to commit database\n" );
res = MsiCloseHandle( hdb );
ok( res == ERROR_SUCCESS , "Failed to close database\n" );
......
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