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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2026-03-26 18:17:27 -04:00
1 parent ab8d87e71d
commit 8cd1fbc6b9
1 file changed
+1 -1
+1 -1
View File
@@ -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