#19685: Scanning local extensions

- Adopt to gallery extension id (lowercase) while scanning local extensions in Extension management and Extension host
This commit is contained in:
Sandeep Somavarapu
2017-03-01 12:56:02 +01:00
parent 0e9418a6f9
commit 1babad1f58
3 changed files with 22 additions and 11 deletions

View File

@@ -17,6 +17,7 @@ import json = require('vs/base/common/json');
import Types = require('vs/base/common/types');
import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensionValidator';
import * as semver from 'semver';
import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
const MANIFEST_FILE = 'package.json';
@@ -313,15 +314,13 @@ export class ExtensionScanner {
return;
}
const match = /^([^.]+\..+)-(\d+\.\d+\.\d+)$/.exec(folder);
const {id, version} = getIdAndVersionFromLocalExtensionId(folder);
if (!match) {
if (!id && !version) {
nonGallery.push(folder);
return;
}
const id = match[1];
const version = match[2];
gallery.push({ folder, id, version });
});