Skip to content

Commit

Permalink
Merge pull request #213 from mbehr1/fix/win_unzip2
Browse files Browse the repository at this point in the history
fix(unzip): accept !\ for windows
  • Loading branch information
mbehr1 authored Jul 21, 2024
2 parents 6c84649 + 6823277 commit 10947a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/adltDocumentProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ export class AdltDocument implements vscode.Disposable {
const isLocalAddress = uri.authority === undefined || uri.authority === ''
if (isLocalAddress) {
const fileExists = this._fileNames.length > 0 && fs.existsSync(this._fileNames[0])
const isLocalArchive = !fileExists && this._fileNames.length > 0 && this._fileNames[0].includes('!/')
const isLocalArchive =
!fileExists && this._fileNames.length > 0 && (this._fileNames[0].includes('!/') || this._fileNames[0].includes('!\\'))
if (!(fileExists || isLocalArchive)) {
log.warn(`AdltDocument file ${uri.toString()} ('${JSON.stringify(this._fileNames)}') doesn't exist!`)
throw Error(`AdltDocument file ${uri.toString()} doesn't exist!`)
Expand Down

0 comments on commit 10947a3

Please sign in to comment.