James Hawkins : msi: Return ERROR_FILE_INVALID if the file has no version information.

Alexandre Julliard julliard at winehq.org
Tue Feb 5 06:34:07 CST 2008


Module: wine
Branch: master
Commit: d1654350483de252ff93365cd6533170a98248e4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d1654350483de252ff93365cd6533170a98248e4

Author: James Hawkins <truiken at gmail.com>
Date:   Mon Feb  4 11:35:53 2008 -0600

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 774c53f..a5b9d10 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 3bd6181..cc2adb5 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");
 




More information about the wine-cvs mailing list