Skip to content

Commit 9efedb1

Browse files
committed
fix fileshare name encoding
1 parent 0264079 commit 9efedb1

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"type": "module",
4-
"version": "1.0.5",
4+
"version": "1.0.6",
55
"scripts": {
66
"dev": "vite",
77
"build": "vite build",

src/components/routes/webdav/components/dialog/FileShare.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function shareSelectedFiles(name) {
3232
function FileShare(props) {
3333

3434
const state = useProxyState({
35-
name: substringAfterLast(getRoutePath(), '/'),
35+
name: decodeURIComponent(substringAfterLast(getRoutePath(), '/')),
3636
})
3737

3838
const {name} = state;

src/components/routes/webdav/components/dialog/search/FileSearch.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ export async function searchFiles(name) {
3838
if (file.name.includes(name)) {
3939
results.push({
4040
...file,
41-
path: `${path}/${file.name}`
41+
path: `${path}/${encodeURIComponent(file.name)}`
4242
})
4343
}
4444
if (file.isFolder) {
45-
searchFolder(file, `${path}/${file.name}`)
45+
searchFolder(file, `${path}/${encodeURIComponent(file.name)}`)
4646
}
4747
}
4848
}

0 commit comments

Comments
 (0)