Skip to content

Commit

Permalink
fix: used path.sep instead of string regex
Browse files Browse the repository at this point in the history
  • Loading branch information
captaincrazybro committed Aug 5, 2024
1 parent c7bc031 commit 869b206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extension-host/services/extension.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 869b206

Please sign in to comment.