[WINESYNC] msiexec: Append .msi extension to file name if file is not found.

Fixes Stellaris failing to install launcher at start.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fd5d942a733bf35b7c6b6644d2aed571c185baba by Paul Gofman <pgofman@codeweavers.com>
This commit is contained in:
winesync 2022-03-13 23:59:56 +01:00 committed by Mark Jansen
parent f56eca297a
commit 6eaaa698cd
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 60 additions and 2 deletions

View file

@ -64,6 +64,8 @@ static void WINAPIV check_record_(int line, MSIHANDLE rec, UINT count, ...)
static void test_msidatabase(void)
{
MSIHANDLE hdb = 0, hdb2 = 0;
WCHAR path[MAX_PATH];
DWORD len;
UINT res;
DeleteFileW(msifileW);
@ -162,6 +164,22 @@ static void test_msidatabase(void)
res = MsiCloseHandle( hdb );
ok( res == ERROR_SUCCESS , "Failed to close database\n" );
res = GetCurrentDirectoryW(ARRAY_SIZE(path), path);
ok ( res, "Got zero res.\n" );
lstrcatW( path, L"\\");
lstrcatW( path, msifileW);
len = lstrlenW(path);
path[len - 4] = 0;
res = MsiOpenDatabaseW( path, MSIDBOPEN_READONLY, &hdb );
ok( res != ERROR_SUCCESS , "Got unexpected res %u.\n", res );
lstrcpyW( path, msifileW );
path[lstrlenW(path) - 4] = 0;
res = MsiOpenDatabaseW( path, MSIDBOPEN_READONLY, &hdb );
ok( res != ERROR_SUCCESS , "Got unexpected res %u.\n", res );
res = DeleteFileA( msifile2 );
ok( res == TRUE, "Failed to delete database\n" );