From c7bc03181df370e661e708f73edeb8339027fb30 Mon Sep 17 00:00:00 2001 From: captaincrazybro Date: Mon, 5 Aug 2024 11:11:19 -0400 Subject: [PATCH] fix: `manageExtensions` provider correctly parses extension name on Windows --- src/extension-host/services/extension.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extension-host/services/extension.service.ts b/src/extension-host/services/extension.service.ts index 4a7dd81e8d..b365a382e2 100644 --- a/src/extension-host/services/extension.service.ts +++ b/src/extension-host/services/extension.service.ts @@ -611,7 +611,8 @@ function getExtensionUri(baseUri: string, extensionName: string, extensionVersio */ function extractExtensionDetailsFromFileNames(fileUris: string[]): ExtensionIdentifier[] { return fileUris.map((fileUri: string) => { - const fileName = fileUri.split('/').pop(); + // Splits by either a forward-slash or back-slash to support Windows as well + const fileName = fileUri.split(/\\|\//).pop(); if (!fileName?.endsWith('.zip')) throw new Error(`Not a ZIP file: ${fileName}`); const lastDashIndex = fileName.lastIndexOf('_'); const extensionName = fileName.substring(0, lastDashIndex);