Commit 5bc58410 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

dbghelp: Don't use PATH to search for libraries.

It should be used only for the main executable, for which we get full path anyway. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ceae3f02
......@@ -1435,8 +1435,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
load_elf.dyn_addr = dyn_addr;
load_elf.elf_info = elf_info;
ret = search_unix_path(filename, getenv("PATH"), elf_load_file_cb, &load_elf)
|| search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
ret = search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
|| search_dll_path(filename, elf_load_file_cb, &load_elf);
}
......
......@@ -1572,15 +1572,9 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
load_params.load_addr = load_addr;
load_params.macho_info = macho_info;
/* If has no directories, try PATH first. */
/* Try DYLD_LIBRARY_PATH first. */
p = file_name(filename);
if (p == filename)
{
ret = search_unix_path(filename, getenv("PATH"), macho_load_file_cb, &load_params);
}
/* Try DYLD_LIBRARY_PATH, with just the filename (no directories). */
if (!ret)
ret = search_unix_path(p, getenv("DYLD_LIBRARY_PATH"), macho_load_file_cb, &load_params);
ret = search_unix_path(p, getenv("DYLD_LIBRARY_PATH"), macho_load_file_cb, &load_params);
/* Try the path as given. */
if (!ret)
......
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