From 911541895f064a529acb2217ddc0457998053bfb Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Thu, 16 Apr 2026 18:08:18 +0200 Subject: [PATCH] no resolve and fail? --- modules/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/web.py b/modules/web.py index 7de60ad..40afa2d 100644 --- a/modules/web.py +++ b/modules/web.py @@ -113,7 +113,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws await websocket.close(1001, "") clients.discard(websocket) async def process_request(websocket: ServerConnection, request: Request): - if request.path == "/" and (file := Path(__file__, "..", "web.html")).exists(): + if request.path == "/" and (file := Path(__file__, "..", "web.html").resolve()).exists(): data = file.read_bytes() return Response( 200, @@ -121,7 +121,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws Headers([("Content-Type", "text/html"), ("Content-Length", f"{len(data)}")]), data ) - if request.path == "/web.js" and (file := Path(__file__, "..", "web.js")).exists(): + if request.path == "/web.js" and (file := Path(__file__, "..", "web.js").resolve()).exists(): data = file.read_bytes() return Response( 200,