https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6d0c1c59ca5f486e55427…
commit 6d0c1c59ca5f486e554272b512be3bc36eabf814
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 01:21:41 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:17 2022 +0100
[WINESYNC] msi: Return ERROR_INVALID_HANDLE when MsiDatabaseImport() is called from a
custom action.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 19420f5f7c146f0ade010b9fbfaf21f926ef10a8 by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/database.c | 13 ++-----------
modules/rostests/winetests/msi/custom.c | 2 +-
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/dll/win32/msi/database.c b/dll/win32/msi/database.c
index d0399039447..11ed27d9f20 100644
--- a/dll/win32/msi/database.c
+++ b/dll/win32/msi/database.c
@@ -870,17 +870,8 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder,
LPCWSTR szFil
TRACE("%x %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename));
- db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
- if( !db )
- {
- MSIHANDLE remote_database = msi_get_remote( handle );
- if ( !remote_database )
- return ERROR_INVALID_HANDLE;
-
- WARN("MsiDatabaseImport not allowed during a custom action!\n");
-
- return ERROR_SUCCESS;
- }
+ if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
+ return ERROR_INVALID_HANDLE;
r = MSI_DatabaseImport( db, szFolder, szFilename );
msiobj_release( &db->hdr );
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index d9d4689c4e7..b8da55e1ce1 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1138,7 +1138,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiDatabaseImportA(db, path, "bogus.idt");
- todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
+ ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiDatabaseCommit(db);
ok(hinst, r == ERROR_SUCCESS, "got %u\n", r);