From 8cd1fbc6b9c779b66d7ef87d631238304c227ebf Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 25 Mar 2026 22:10:32 -0700 Subject: [PATCH] web_server: Fix locating SVG icons on production setup Tests: - On a development setup, loading the home page and a few other pages works without errors. FreedomBox icon in the navbar (and other icons) are shown. - On a testing setup, without development mode, loading the home page and a few other pages works without errors. FreedomBox icon in the navbar (and other icons) are shown. Without the patch no page loads. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/web_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/web_server.py b/plinth/web_server.py index b8edc5982..2c72b5660 100644 --- a/plinth/web_server.py +++ b/plinth/web_server.py @@ -210,4 +210,4 @@ def resolve_static_path(url: str) -> pathlib.Path: return static_dir / '/'.join(url_parts[1:]) - return pathlib.Path(__file__).parent.parent / 'static' / url + return pathlib.Path(cfg.file_root) / 'static' / url