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
  • Loading branch information
captaincrazybro committed Aug 5, 2024
1 parent cf193b2 commit c7bc031
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(/\\|\//).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 c7bc031

Please sign in to comment.