From d1654350483de252ff93365cd6533170a98248e4 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Mon, 4 Feb 2008 11:35:53 -0600 Subject: [PATCH] msi: Return ERROR_FILE_INVALID if the file has no version information. --- dlls/msi/msi.c | 2 ++ dlls/msi/tests/msi.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 774c53fcf00..a5b9d10c5c4 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -1593,6 +1593,8 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf, gle = GetLastError(); if (gle == ERROR_BAD_PATHNAME) return ERROR_FILE_NOT_FOUND; + else if (gle == ERROR_RESOURCE_DATA_NOT_FOUND) + return ERROR_FILE_INVALID; return gle; } diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 3bd618100dd..cc2adb5fffc 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -1950,11 +1950,8 @@ static void test_MsiGetFileVersion(void) ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); ok(!lstrcmpA(lang, "lang"), "Expected lang to be unchanged, got %s\n", lang); - todo_wine - { - ok(r == ERROR_FILE_INVALID, - "Expected ERROR_FILE_INVALID, got %d\n", r); - } + ok(r == ERROR_FILE_INVALID, + "Expected ERROR_FILE_INVALID, got %d\n", r); DeleteFileA("ver.txt"); -- 2.11.4.GIT