diff --git a/pymhf/main.py b/pymhf/main.py index 5bd19e6..6f99309 100644 --- a/pymhf/main.py +++ b/pymhf/main.py @@ -273,6 +273,7 @@ def kill_injected_code(loop: asyncio.AbstractEventLoop): _preinject_shellcode = f.read() pm_binary.inject_python_shellcode(_preinject_shellcode) # Inject the common NMS variables which are required for general use. + module_path = op.realpath(module_path) module_path = module_path.replace("\\", "\\\\") pm_binary.inject_python_shellcode( f""" diff --git a/pymhf/utils/config.py b/pymhf/utils/config.py index ef9cae3..8165976 100644 --- a/pymhf/utils/config.py +++ b/pymhf/utils/config.py @@ -58,14 +58,13 @@ def canonicalize_setting( print("Critical Error: Cannot find user directory. Ensure APPDATA environment variable is set") exit() if plugin_name is not None: - return op.join(appdata_data, "pymhf", plugin_name, *_suffix) + return op.realpath(op.join(appdata_data, "pymhf", plugin_name, *_suffix)) else: raise ValueError("{USER_DIR} cannot be used for single-file mods.") elif tag == "EXE_DIR": if exe_dir: - return op.join(exe_dir, *_suffix) + return op.realpath(op.join(exe_dir, *_suffix)) else: raise ValueError("Exe directory cannot be determined") elif tag == "CURR_DIR": - print(module_dir, _suffix) - return op.join(module_dir, *_suffix) + return op.realpath(op.join(module_dir, *_suffix))