Skip to content

Commit 850ea87

Browse files
committed
sqlite_wasm: fix database path
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent cea4988 commit 850ea87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/board_compare/frontend/sqlite_wasm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ async def open_database_url(self, url: str) -> SQLDatabase:
183183

184184
# Convert filename to URL (assume local server)
185185
if not url.startswith("http"):
186-
# Use the current page's base URL
186+
# Use the current page's base URL and preserve the path
187+
base_url = str(js.window.location.href).rsplit('/', 1)[0]
188+
url = f"{base_url}/{url}"
187189
base_url = str(js.window.location.origin)
188190
url = f"{base_url}/{url}"
189191

0 commit comments

Comments
 (0)