msi: If the package doesn't exist, return ERROR_FILE_NOT_FOUND.

This commit is contained in:
James Hawkins 2007-12-16 20:24:11 -06:00 committed by Alexandre Julliard
parent f933dd8b4f
commit 620862e385
2 changed files with 4 additions and 4 deletions

View File

@ -892,6 +892,9 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
if (file != szPackage)
DeleteFileW( file );
if (GetFileAttributesW(szPackage) == INVALID_FILE_ATTRIBUTES)
return ERROR_FILE_NOT_FOUND;
return r;
}
}

View File

@ -2049,10 +2049,7 @@ static void test_msipackage(void)
/* nonexistent szPackagePath */
r = MsiOpenPackage("nonexistent", &hpack);
todo_wine
{
ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
}
ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", r);
/* NULL hProduct */
r = MsiOpenPackage(msifile, NULL);