Module: wine Branch: master Commit: 620862e3854e64c1d3b4b3d066e6debdc7af3591 URL: http://source.winehq.org/git/wine.git/?a=commit;h=620862e3854e64c1d3b4b3d066...
Author: James Hawkins truiken@gmail.com Date: Sun Dec 16 20:24:11 2007 -0600
msi: If the package doesn't exist, return ERROR_FILE_NOT_FOUND.
---
dlls/msi/package.c | 3 +++ dlls/msi/tests/package.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 58861d3..cb6e25d 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -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; } } diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index af9b786..8d6125d 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -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);