Skip to content

Commit 0b58930

Browse files
authored
1 parent 5e3392e commit 0b58930

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/vs/platform/extensionManagement/common/extensionsProfileScannerService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ export abstract class AbstractExtensionsProfileScannerService extends Disposable
127127
await this.withProfileExtensions(profileLocation, profileExtensions => {
128128
const result: IScannedProfileExtension[] = [];
129129
for (const extension of profileExtensions) {
130-
if (extensions.some(([e]) => areSameExtensions(e.identifier, extension.identifier) && e.manifest.version !== extension.version)) {
131-
// Remove the existing extension with different version
130+
if (extensions.some(([e]) => areSameExtensions(e.identifier, extension.identifier))) {
131+
// Remove the existing extension
132132
extensionsToRemove.push(extension);
133133
} else {
134134
result.push(extension);

src/vs/platform/extensionManagement/node/extensionManagementService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,10 @@ export class ExtensionsScanner extends Disposable {
570570
await this.withUninstalledExtensions(uninstalled => delete uninstalled[extensionKey.toString()]);
571571
}
572572

573-
removeExtension(extension: ILocalExtension | IScannedExtension, type: string): Promise<void> {
574-
return this.deleteExtensionFromLocation(extension.identifier.id, extension.location, type);
573+
async removeExtension(extension: ILocalExtension | IScannedExtension, type: string): Promise<void> {
574+
if (this.uriIdentityService.extUri.isEqualOrParent(this.extensionsScannerService.userExtensionsLocation, extension.location)) {
575+
return this.deleteExtensionFromLocation(extension.identifier.id, extension.location, type);
576+
}
575577
}
576578

577579
async removeUninstalledExtension(extension: ILocalExtension | IScannedExtension): Promise<void> {

0 commit comments

Comments
 (0)