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

This commit is contained in:
James Hawkins 2008-02-04 11:35:53 -06:00 committed by Alexandre Julliard
parent 03335de8d0
commit d165435048
2 changed files with 4 additions and 5 deletions

View File

@ -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;
}

View File

@ -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");