fix: resolve forge_dir to forge-gui sibling when res/ not found in forge-gui-desktop

This commit is contained in:
KoalaTrapLord authored and GitHub committed 2026-03-20 11:22:44 -04:00
1 parent a62640668b
commit a2fbc30b2b
2 files changed
+15 -11

No files matched your search

+4
View File
@@ -159,6 +159,10 @@ def _resolve_forge_dir() -> str:
return str(candidate)
# Also try just one level up from target/
candidate = jar_path.parent.parent
# Check forge-gui sibling of forge-gui-desktop (res/ lives there)
forge_gui_sibling = jar_path.parent.parent.parent / "forge-gui"
if forge_gui_sibling.is_dir() and (forge_gui_sibling / "res").is_dir():
return str(forge_gui_sibling)
if candidate.is_dir() and (candidate / "res").is_dir():
return str(candidate)
# Fall back to the directory containing the JAR itself