diff --git a/shared/sx/helpers.py b/shared/sx/helpers.py index 251f5a4..773b223 100644 --- a/shared/sx/helpers.py +++ b/shared/sx/helpers.py @@ -1047,7 +1047,7 @@ def _script_hash(filename: str) -> str: """Compute MD5 hash of a static script file, cached for process lifetime.""" if filename not in _SCRIPT_HASH_CACHE: try: - data = (Path("static") / "scripts" / filename).read_bytes() + data = (Path(__file__).resolve().parent.parent / "static" / "scripts" / filename).read_bytes() _SCRIPT_HASH_CACHE[filename] = hashlib.md5(data).hexdigest()[:8] except OSError: _SCRIPT_HASH_CACHE[filename] = "dev"