Cleaned up old reflex files/legacy code etc
This commit is contained in:
@@ -8,11 +8,11 @@ def get_resource_path(relative_path: str) -> Path:
|
||||
"""Return absolute path to a bundled resource.
|
||||
|
||||
In frozen mode (PyInstaller), resolves from sys._MEIPASS.
|
||||
In dev mode, resolves from the project root (3 parents up from this file:
|
||||
src/core/resource_path.py → src/core → src → project root).
|
||||
In dev mode, resolves from the project root (2 parents up from this file:
|
||||
core/resource_path.py → core → project root).
|
||||
"""
|
||||
if getattr(sys, "frozen", False):
|
||||
base = Path(sys._MEIPASS)
|
||||
else:
|
||||
base = Path(__file__).resolve().parents[2]
|
||||
base = Path(__file__).resolve().parents[1]
|
||||
return base / relative_path
|
||||
|
||||
Reference in New Issue
Block a user