From 52019853e6d0c10f982205569cdaa6393b68baef Mon Sep 17 00:00:00 2001 From: jonschz Date: Tue, 29 Oct 2024 23:26:51 +0100 Subject: [PATCH] Fix relative paths in reccmp-build.yml --- reccmp/ghidra_scripts/import_functions_and_types_from_pdb.py | 1 + reccmp/project/detect.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/reccmp/ghidra_scripts/import_functions_and_types_from_pdb.py b/reccmp/ghidra_scripts/import_functions_and_types_from_pdb.py index 274485d1..70740a06 100644 --- a/reccmp/ghidra_scripts/import_functions_and_types_from_pdb.py +++ b/reccmp/ghidra_scripts/import_functions_and_types_from_pdb.py @@ -304,6 +304,7 @@ def main(): import setuptools # pylint: disable=unused-import # required to fix a distutils issue in Python 3.12 # Packages are imported down here because reccmp's dependencies are only available after the venv was added to the pythonpath + reload_module("reccmp.project.detect") from reccmp.project.common import RECCMP_BUILD_CONFIG, RECCMP_PROJECT_CONFIG from reccmp.project.detect import RecCmpBuiltProject, RecCmpBuiltTarget from reccmp.project.error import RecCmpProjectNotFoundException diff --git a/reccmp/project/detect.py b/reccmp/project/detect.py index 81eedf9a..40da8604 100644 --- a/reccmp/project/detect.py +++ b/reccmp/project/detect.py @@ -139,7 +139,8 @@ def from_directory(cls, directory: Path) -> "RecCmpBuiltProject": yaml_loader = ruamel.yaml.YAML() build_data = yaml_loader.load(build_config.open()) - project_directory = Path(build_data["project"]) + # note that Path.joinpath() will ignore the first path if the second path is absolute + project_directory = build_directory.joinpath(Path(build_data["project"])) project_config_path = project_directory / RECCMP_PROJECT_CONFIG if not project_config_path.is_file(): raise InvalidRecCmpProjectException(