@@ -41,6 +41,7 @@ import { IExtensionsScannerService, IScannedExtension } from '../../../../platfo
4141import { IStorageService , StorageScope , StorageTarget } from '../../../../platform/storage/common/storage.js' ;
4242import { IUriIdentityService } from '../../../../platform/uriIdentity/common/uriIdentity.js' ;
4343import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
44+ import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.js' ;
4445
4546function isGalleryExtension ( extension : IResourceExtension | IGalleryExtension ) : extension is IGalleryExtension {
4647 return extension . type === 'gallery' ;
@@ -84,6 +85,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench
8485 @IExtensionManagementServerService protected readonly extensionManagementServerService : IExtensionManagementServerService ,
8586 @IExtensionGalleryService private readonly extensionGalleryService : IExtensionGalleryService ,
8687 @IUserDataProfileService private readonly userDataProfileService : IUserDataProfileService ,
88+ @IUserDataProfilesService private readonly userDataProfilesService : IUserDataProfilesService ,
8789 @IConfigurationService protected readonly configurationService : IConfigurationService ,
8890 @IProductService protected readonly productService : IProductService ,
8991 @IDownloadService protected readonly downloadService : IDownloadService ,
@@ -265,7 +267,8 @@ export class ExtensionManagementService extends Disposable implements IWorkbench
265267 updateMetadata ( extension : ILocalExtension , metadata : Partial < Metadata > ) : Promise < ILocalExtension > {
266268 const server = this . getServer ( extension ) ;
267269 if ( server ) {
268- return server . extensionManagementService . updateMetadata ( extension , metadata , this . userDataProfileService . currentProfile . extensionsResource ) ;
270+ const profile = extension . isApplicationScoped ? this . userDataProfilesService . defaultProfile : this . userDataProfileService . currentProfile ;
271+ return server . extensionManagementService . updateMetadata ( extension , metadata , profile . extensionsResource ) ;
269272 }
270273 return Promise . reject ( `Invalid location ${ extension . location . toString ( ) } ` ) ;
271274 }
0 commit comments