@samitouri / QOSami-HFS / commits / e0e029a9

fix: wrong download name if file name contains \

Massimo Melina committed Jan 21, 2025 at 18:30 UTC e0e029a9a10e1d6391a62c46cdfc1752b17d8477
1 file changed +1 -1
src/vfs.ts
+1 -1
@@ -202,7 +202,7 @@ export function getNodeName(node: VfsNode) {
202 const base = basename(source)
203 if (/^[./\\]*$/.test(base)) // if empty or special-chars-only
204 return basename(resolve(source)) // resolve to try to get more
205 - if (base.includes('\\')) // source was Windows but now we are running posix. This probably happens only debugging, so it's DX
205 + if (base.includes('\\') && !source.includes('/')) // source was Windows but now we are running posix. This probably happens only debugging, so it's DX
206 return source.slice(source.lastIndexOf('\\') + 1)
207 return base
208 }