no resolve and fail?

This commit is contained in:
2026-04-16 18:08:18 +02:00
parent e1acdb9e60
commit 911541895f
+2 -2
View File
@@ -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,