From 4aaf6e4d7352d658de15d02197bb5714b4345fd8 Mon Sep 17 00:00:00 2001 From: Fornax Date: Wed, 19 Apr 2023 20:11:08 +0200 Subject: [PATCH] It was still not right --- svelte/src/filesystem/Filesystem.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svelte/src/filesystem/Filesystem.svelte b/svelte/src/filesystem/Filesystem.svelte index a16bb62..0671263 100644 --- a/svelte/src/filesystem/Filesystem.svelte +++ b/svelte/src/filesystem/Filesystem.svelte @@ -241,8 +241,8 @@ const open_sibling = async offset => { // Capture browser back and forward navigation buttons window.onpopstate = (e) => { // Get the part of the URL after the bucket ID and navigate to it - let locsplit = document.location.pathname.split(state.root.id, 2) - navigate(decodeURIComponent(locsplit[1]), false) + let path = document.location.pathname.replace("/d/"+state.root.id, "") + navigate(decodeURIComponent(path), false) }; const keydown = e => {