This commit is contained in:
Sandeep Somavarapu 2024-01-26 13:19:43 +01:00 committed by GitHub
parent 35d97bc7e4
commit e1f27e691f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -599,7 +599,13 @@ export class ExtensionsScanner extends Disposable {
metadata = { ...source?.metadata, ...metadata };
if (target) {
await this.extensionsProfileScannerService.updateMetadata([[extension, { ...target.metadata, ...metadata }]], toProfileLocation);
if (this.uriIdentityService.extUri.isEqual(target.location, extension.location)) {
await this.extensionsProfileScannerService.updateMetadata([[extension, { ...target.metadata, ...metadata }]], toProfileLocation);
} else {
const targetExtension = await this.scanLocalExtension(target.location, extension.type, toProfileLocation);
await this.extensionsProfileScannerService.removeExtensionFromProfile(targetExtension, toProfileLocation);
await this.extensionsProfileScannerService.addExtensionsToProfile([[extension, { ...target.metadata, ...metadata }]], toProfileLocation);
}
} else {
await this.extensionsProfileScannerService.addExtensionsToProfile([[extension, metadata]], toProfileLocation);
}