@samitouri / QOSami-HFS / commits / fea01b21

reduce encoding in get=list

Massimo Melina committed Feb 27, 2025 at 18:37 UTC fea01b21b6c2d839d1c8dab8ce36569af01f5d0b
1 file changed +1 -1
src/serveGuiAndSharedFiles.ts
+1 -1
@@ -159,7 +159,7 @@ async function sendFolderList(node: VfsNode, ctx: Koa.Context) {
159 const { URL } = ctx
160 const base = prepend === undefined && baseUrl.get()
161 || URL.protocol + '//' + URL.host + ctx.state.revProxyPath
162 - prepend = base + ctx.originalUrl.split('?')[0]! as string
162 + prepend = base + pathEncode(decodeURI(ctx.path)) // redo the encoding our way, keeping unicode chars unchanged
163 }
164 const walker = walkNode(node, { ctx, depth: depth === '*' ? Infinity : Number(depth) })
165 ctx.body = asyncGeneratorToReadable(filterMapGenerator(walker, async el => {