msi: Open the database read/write in MSI_OpenPackageW.

Fixes transforms that add binary streams.
This commit is contained in:
Hans Leidekker 2009-10-20 14:10:19 +02:00 committed by Alexandre Julliard
parent 8dd3d389b0
commit afcd2c5358
1 changed files with 5 additions and 1 deletions

View File

@ -966,7 +966,11 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
return GetLastError();
}
r = MSI_OpenDatabaseW( file, MSIDBOPEN_READONLY, &db );
/* transforms that add binary streams require that we open the database
* read/write, which is safe because we always create a copy that is thrown
* away when we're done.
*/
r = MSI_OpenDatabaseW( file, MSIDBOPEN_DIRECT, &db );
if( r != ERROR_SUCCESS )
{
if (file != szPackage)