From add9230a5f23ecfe0a9ddc2ee7a67c590153e826 Mon Sep 17 00:00:00 2001 From: Yusur Princeps Date: Sun, 10 Aug 2025 11:45:55 +0200 Subject: [PATCH] fix wrong path --- src/suou/sass.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/suou/sass.py b/src/suou/sass.py index a73923e..0b7477c 100644 --- a/src/suou/sass.py +++ b/src/suou/sass.py @@ -122,17 +122,19 @@ class SassAsyncMiddleware(_MiddlewareFactory): yield chunk else: break + + file_path = os.path.join(package_dir, result) await send({ 'type': 'http.response.start', 'status': 200, 'headers': [ (b'Content-Type', b'text/css; charset=utf-8'), - (b'Content-Length', want_bytes(f'{os.path.getsize(path)}')) + (b'Content-Length', want_bytes(f'{os.path.getsize(file_path)}')) ] }) - async for chunk in _read_file(os.path.join(package_dir, result)): + async for chunk in _read_file(file_path): await send({ 'type': 'http.response.body', 'body': chunk