From 6823277290b0cd26bdf6b4f8b325dd5c5c0f6674 Mon Sep 17 00:00:00 2001 From: Matthias Behr Date: Sun, 21 Jul 2024 17:42:35 +0200 Subject: [PATCH] fix(unzip): accept !\ for windows --- src/adltDocumentProvider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adltDocumentProvider.ts b/src/adltDocumentProvider.ts index 6d3188c5..4eb3c78f 100644 --- a/src/adltDocumentProvider.ts +++ b/src/adltDocumentProvider.ts @@ -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!`)