Commit 6af99937 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

mshtml: Call install_cab_file() with name directly on non-Wine.

parent 1420ef9c
......@@ -193,18 +193,21 @@ static BOOL install_from_unix_file(const char *file_name)
close(fd);
if(!wine_get_dos_file_name) {
if(!wine_get_dos_file_name)
wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32W), "wine_get_dos_file_name");
if(!wine_get_dos_file_name) {
ERR("Could not get wine_get_dos_file_name function.\n");
return FALSE;
}
}
dos_file_name = wine_get_dos_file_name(file_name);
if(!dos_file_name) {
ERR("Could not get dos file name of %s\n", debugstr_a(file_name));
return FALSE;
if(wine_get_dos_file_name) { /* Wine UNIX mode */
dos_file_name = wine_get_dos_file_name(file_name);
if(!dos_file_name) {
ERR("Could not get dos file name of %s\n", debugstr_a(file_name));
return FALSE;
}
} else { /* Windows mode */
UINT res;
WARN("Could not get wine_get_dos_file_name function, calling install_cab directly.\n");
res = MultiByteToWideChar( CP_ACP, 0, file_name, -1, 0, 0);
dos_file_name = heap_alloc (res*sizeof(WCHAR));
MultiByteToWideChar( CP_ACP, 0, file_name, -1, dos_file_name, res);
}
ret = install_cab(dos_file_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment