Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jul 26, 2023
1 parent 5e3392e commit 0b58930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ export abstract class AbstractExtensionsProfileScannerService extends Disposable
await this.withProfileExtensions(profileLocation, profileExtensions => {
const result: IScannedProfileExtension[] = [];
for (const extension of profileExtensions) {
if (extensions.some(([e]) => areSameExtensions(e.identifier, extension.identifier) && e.manifest.version !== extension.version)) {
// Remove the existing extension with different version
if (extensions.some(([e]) => areSameExtensions(e.identifier, extension.identifier))) {
// Remove the existing extension
extensionsToRemove.push(extension);
} else {
result.push(extension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,10 @@ export class ExtensionsScanner extends Disposable {
await this.withUninstalledExtensions(uninstalled => delete uninstalled[extensionKey.toString()]);
}

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

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

0 comments on commit 0b58930

Please sign in to comment.