Skip to content

Commit

Permalink
Merge pull request #212 from mbehr1/fix/win_unzip
Browse files Browse the repository at this point in the history
fix(unzip): dont add two slashes to support win paths
  • Loading branch information
mbehr1 authored Jul 21, 2024
2 parents 134f94d + 82a11a2 commit 42681f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export function activate(context: vscode.ExtensionContext) {
// open new file dialog if more than 1 supported file is contained

log.info(`open dlt via adlt got archive URI=${uri.toString()}`) // e.g. file:///Users/mbehr/Downloads/logs_25091896545.zip
const fsUri = vscode.Uri.from({ scheme: adltScheme, path: `/fs/${uri.fsPath}!/`, authority: localAddr })
const fsUri = vscode.Uri.from({ scheme: adltScheme, path: `/fs${uri.fsPath}!/`, authority: localAddr })

const dirEntries = await adltProvider.readDirectory(fsUri)
const onlyFiles = !dirEntries.some((e) => e[1] !== vscode.FileType.File)
Expand All @@ -367,7 +367,7 @@ export function activate(context: vscode.ExtensionContext) {
})
return res !== undefined
? res.map((r) => {
const mr = r.path.startsWith('/fs/') ? vscode.Uri.from({ scheme: uri.scheme, path: r.path.slice(4) }) : r
const mr = r.path.startsWith('/fs') ? vscode.Uri.from({ scheme: uri.scheme, path: r.path.slice(3) }) : r
log.warn(`mapping ${r} to ${mr}`)
return mr
})
Expand Down

0 comments on commit 42681f9

Please sign in to comment.