提交 921c26ba 编写于 作者: S Sandeep Somavarapu

FIx #53426

上级 c0caab4d
......@@ -18,7 +18,7 @@ import { IPager, mapPager, singlePagePager } from 'vs/base/common/paging';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import {
IExtensionManagementService, IExtensionGalleryService, ILocalExtension, IGalleryExtension, IQueryOptions, IExtensionManifest,
InstallExtensionEvent, DidInstallExtensionEvent, LocalExtensionType, DidUninstallExtensionEvent, IExtensionEnablementService, IExtensionIdentifier, EnablementState, IExtensionTipsService, ExtensionRecommendationSource, IExtensionRecommendation
InstallExtensionEvent, DidInstallExtensionEvent, LocalExtensionType, DidUninstallExtensionEvent, IExtensionEnablementService, IExtensionIdentifier, EnablementState, IExtensionTipsService, ExtensionRecommendationSource, IExtensionRecommendation, IExtensionManagementServerService
} from 'vs/platform/extensionManagement/common/extensionManagement';
import { getGalleryExtensionIdFromLocal, getGalleryExtensionTelemetryData, getLocalExtensionTelemetryData, areSameExtensions, getMaliciousExtensionsSet } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
......@@ -352,7 +352,8 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService,
@ILogService private logService: ILogService,
@IProgressService2 private progressService: IProgressService2,
@IExtensionService private runtimeExtensionService: IExtensionService,
@IExtensionTipsService private extensionTipsService: IExtensionTipsService
@IExtensionTipsService private extensionTipsService: IExtensionTipsService,
@IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService
) {
this.stateProvider = ext => this.getExtensionState(ext);
......@@ -877,7 +878,8 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService,
if (!error) {
const installed = this.installed.filter(e => e.id === extension.id)[0];
if (installed) {
const existingLocal = installed.locals.filter(l => l.location.toString() === local.location.toString())[0];
const server = this.extensionManagementServerService.getExtensionManagementServer(local.location);
const existingLocal = installed.locals.filter(l => this.extensionManagementServerService.getExtensionManagementServer(l.location).location.toString() === server.location.toString())[0];
if (existingLocal) {
const locals = [...installed.locals];
locals.splice(installed.locals.indexOf(existingLocal), 1, local);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册