From d3f584b73841a9d91c71c4de4683e52af323e31e Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Fri, 3 Nov 2023 21:59:44 +0000 Subject: [PATCH] URL decode before using control API --- cista-front/src/components/FileExplorer.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cista-front/src/components/FileExplorer.vue b/cista-front/src/components/FileExplorer.vue index 301c0c5..cb1117d 100644 --- a/cista-front/src/components/FileExplorer.vue +++ b/cista-front/src/components/FileExplorer.vue @@ -125,7 +125,7 @@ const rename = (doc: FolderDocument, newName: string) => { control.send( JSON.stringify({ op: 'rename', - path: `${linkBasePath.value}/${oldName}`, + path: `${decodeURIComponent(linkBasePath.value)}/${oldName}`, to: newName }) ) @@ -149,7 +149,7 @@ const mkdir = (doc: FolderDocument, name: string) => { const msg = JSON.parse(ev.data) if ('error' in msg) { console.error('Mkdir failed', msg.error.message, msg.error) - doc.name = oldName + editing.value = null } else { console.log('mkdir', msg) } @@ -158,7 +158,7 @@ const mkdir = (doc: FolderDocument, name: string) => { control.send( JSON.stringify({ op: 'mkdir', - path: `${linkBasePath.value}/${name}`, + path: `${decodeURIComponent(linkBasePath.value)}/${name}`, }) ) }