From 5697d98862efa81a8ad3651e9ef68d754a58ea90 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 27 Jun 2024 11:46:47 +0300 Subject: treewide: fix package structure The static files need to be inside the module to be installed correctly as part of the module. --- backend/decky_loader/loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/decky_loader/loader.py') diff --git a/backend/decky_loader/loader.py b/backend/decky_loader/loader.py index 4fc03237..e8a073a9 100644 --- a/backend/decky_loader/loader.py +++ b/backend/decky_loader/loader.py @@ -106,12 +106,12 @@ class Loader: self.watcher.disabled = False async def handle_frontend_assets(self, request: web.Request): - file = Path(__file__).parents[1].joinpath("static").joinpath(request.match_info["path"]) + file = Path(__file__).parent.joinpath("static").joinpath(request.match_info["path"]) return web.FileResponse(file, headers={"Cache-Control": "no-cache"}) async def handle_frontend_locales(self, request: web.Request): req_lang = request.match_info["path"] - file = Path(__file__).parents[1].joinpath("locales").joinpath(req_lang) + file = Path(__file__).parent.joinpath("locales").joinpath(req_lang) if exists(file): return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"}) else: -- cgit v1.2.3