fix: admin/fs: new file added from disk was not then selected if it had a space in the name

Massimo Melina committed Nov 29, 2023 at 23:35 UTC 728b61f8455e406bc0254b290d79b88c9633236a
1 file changed +2 -2
admin/src/addFiles.ts
+2 -2
@@ -34,8 +34,8 @@ export default function addFiles() {
34 h('li', { key: file }, file, ': ', err))
35 )
36 ), 'error')
37 - const good = res.filter(x => x.name).map(x => parent.id + x.name)
38 - reloadVfs(good)
37 + const ids = res.filter(x => x.name).map(x => parent.id + encodeURI(x.name) + (x.link.endsWith('/') ? '/' : ''))
38 + reloadVfs(ids)
39 close()
40 }
41 })