From 869b206e46cbee54421fb13a49f770474881f623 Mon Sep 17 00:00:00 2001 From: captaincrazybro Date: Mon, 5 Aug 2024 13:31:28 -0400 Subject: [PATCH] fix: used `path.sep` instead of string regex --- src/extension-host/services/extension.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension-host/services/extension.service.ts b/src/extension-host/services/extension.service.ts index b365a382e2..c0a5bf9668 100644 --- a/src/extension-host/services/extension.service.ts +++ b/src/extension-host/services/extension.service.ts @@ -612,7 +612,7 @@ function getExtensionUri(baseUri: string, extensionName: string, extensionVersio function extractExtensionDetailsFromFileNames(fileUris: string[]): ExtensionIdentifier[] { return fileUris.map((fileUri: string) => { // Splits by either a forward-slash or back-slash to support Windows as well - const fileName = fileUri.split(/\\|\//).pop(); + const fileName = fileUri.split(path.sep).pop(); if (!fileName?.endsWith('.zip')) throw new Error(`Not a ZIP file: ${fileName}`); const lastDashIndex = fileName.lastIndexOf('_'); const extensionName = fileName.substring(0, lastDashIndex);