@@ -41,6 +41,7 @@ import { IExtensionsScannerService, IScannedExtension } from '../../../../platfo
41
41
import { IStorageService , StorageScope , StorageTarget } from '../../../../platform/storage/common/storage.js' ;
42
42
import { IUriIdentityService } from '../../../../platform/uriIdentity/common/uriIdentity.js' ;
43
43
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
44
+ import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.js' ;
44
45
45
46
function isGalleryExtension ( extension : IResourceExtension | IGalleryExtension ) : extension is IGalleryExtension {
46
47
return extension . type === 'gallery' ;
@@ -84,6 +85,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench
84
85
@IExtensionManagementServerService protected readonly extensionManagementServerService : IExtensionManagementServerService ,
85
86
@IExtensionGalleryService private readonly extensionGalleryService : IExtensionGalleryService ,
86
87
@IUserDataProfileService private readonly userDataProfileService : IUserDataProfileService ,
88
+ @IUserDataProfilesService private readonly userDataProfilesService : IUserDataProfilesService ,
87
89
@IConfigurationService protected readonly configurationService : IConfigurationService ,
88
90
@IProductService protected readonly productService : IProductService ,
89
91
@IDownloadService protected readonly downloadService : IDownloadService ,
@@ -265,7 +267,8 @@ export class ExtensionManagementService extends Disposable implements IWorkbench
265
267
updateMetadata ( extension : ILocalExtension , metadata : Partial < Metadata > ) : Promise < ILocalExtension > {
266
268
const server = this . getServer ( extension ) ;
267
269
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 ) ;
269
272
}
270
273
return Promise . reject ( `Invalid location ${ extension . location . toString ( ) } ` ) ;
271
274
}
0 commit comments