msi: Return ERROR_FILE_INVALID if the file has no version information.
This commit is contained in:
parent
03335de8d0
commit
d165435048
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue