From decf7fc7a84f2ca6f7bd51d05d18d4712aa685da Mon Sep 17 00:00:00 2001 From: Fornax Date: Tue, 5 Mar 2024 13:03:03 +0100 Subject: [PATCH] Fix double encoding of share url --- svelte/src/filesystem/Sharebar.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/svelte/src/filesystem/Sharebar.svelte b/svelte/src/filesystem/Sharebar.svelte index e3dbaf3..20c4405 100644 --- a/svelte/src/filesystem/Sharebar.svelte +++ b/svelte/src/filesystem/Sharebar.svelte @@ -2,7 +2,7 @@ export const generate_share_url = path => { let share_path = generate_share_path(path) if (share_path !== "") { - share_path = window.location.protocol+"//"+window.location.host+"/d/"+share_path + share_path = window.location.protocol+"//"+window.location.host+"/d/"+fs_encode_path(share_path) } return share_path } @@ -22,7 +22,7 @@ export const generate_share_path = path => { // Construct the path starting from the bucket for (let i = bucket_idx+1; i < path.length; i++) { - share_url += "/" + encodeURIComponent(path[i].name) + share_url += "/" + path[i].name } } @@ -32,6 +32,7 @@ export const generate_share_path = path => {