rocm_mgr: use modules.paths.script_path for app root

pull/4726/head
resonantsky 2026-04-02 15:21:54 +02:00
parent f5c037a735
commit 1ed2811c80
1 changed files with 6 additions and 2 deletions

View File

@ -123,8 +123,12 @@ def _get_venv() -> str:
def _get_root() -> str:
"""App root — one level above the venv folder (e.g. E:\\Sd.Next)."""
return str(Path(_get_venv()).parent)
"""App root — from modules.paths.script_path."""
try:
from modules.paths import script_path # pylint: disable=import-outside-toplevel
return str(script_path)
except Exception:
return str(Path(_get_venv()).parent)
def _expand_venv(value: str) -> str: