URL decode before using control API
This commit is contained in:
parent
225f2b0651
commit
d3f584b738
|
@ -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}`,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user