Skip to content

Commit

Permalink
fix: manageExtensions provider correctly parses extension name on W…
Browse files Browse the repository at this point in the history
…indows (#1040)
  • Loading branch information
captaincrazybro authored Aug 5, 2024
2 parents cf193b2 + 869b206 commit 8306c1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extension-host/services/extension.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(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);
Expand Down

0 comments on commit 8306c1a

Please sign in to comment.