diff --git a/.changelog/22.fixed.srt b/.changelog/22.fixed.srt new file mode 100644 index 0000000..49e30c5 --- /dev/null +++ b/.changelog/22.fixed.srt @@ -0,0 +1 @@ +Fixed the engine resolver by path which would return a semantically valid path to a non-existing directory, preventing the resolution of the engine path with the remaining methods \ No newline at end of file diff --git a/src/uepyscripts/internal/engine_resolver.py b/src/uepyscripts/internal/engine_resolver.py index 4b632c1..2996f42 100644 --- a/src/uepyscripts/internal/engine_resolver.py +++ b/src/uepyscripts/internal/engine_resolver.py @@ -76,7 +76,9 @@ def resolve_engine_from_path(project: Project) -> Optional[Path]: if not os.path.isabs(path): path = (project.root_folder / path).resolve() - if os.path.isabs(path): + # Check path exists otherwise we could return a semantically valid path to a folder which does not exist + # and that would make the resolve fail without trying resolvers which are further down in the list + if os.path.isabs(path) and path.exists(): return path return None