@@ -30,7 +30,7 @@ import { IJSONEditingService } from 'vs/workbench/services/configuration/common/
3030import { JSONEditingService } from 'vs/workbench/services/configuration/common/jsonEditingService' ;
3131import { createHash } from 'crypto' ;
3232import { Schemas } from 'vs/base/common/network' ;
33- import { originalFSPath , dirname } from 'vs/base/common/resources' ;
33+ import { originalFSPath } from 'vs/base/common/resources' ;
3434import { isLinux } from 'vs/base/common/platform' ;
3535import { IWindowConfiguration } from 'vs/platform/windows/common/windows' ;
3636import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl' ;
@@ -107,7 +107,7 @@ suite('WorkspaceContextService - Folder', () => {
107107 workspaceResource = folderDir ;
108108 const environmentService = new TestEnvironmentService ( URI . file ( parentDir ) ) ;
109109 const fileService = new FileService ( new NullLogService ( ) ) ;
110- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , new DiskFileSystemProvider ( new NullLogService ( ) ) ) ) ;
110+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , new DiskFileSystemProvider ( new NullLogService ( ) ) , environmentService ) ) ;
111111 workspaceContextService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , new RemoteAgentService ( < IWindowConfiguration > { } , environmentService , new RemoteAuthorityResolverService ( ) , new SignService ( ) ) ) ;
112112 return ( < WorkspaceService > workspaceContextService ) . initialize ( convertToWorkspacePayload ( URI . file ( folderDir ) ) ) ;
113113 } ) ;
@@ -173,7 +173,7 @@ suite('WorkspaceContextService - Workspace', () => {
173173 const fileService = new FileService ( new NullLogService ( ) ) ;
174174 const diskFileSystemProvider = new DiskFileSystemProvider ( new NullLogService ( ) ) ;
175175 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
176- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , diskFileSystemProvider ) ) ;
176+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , diskFileSystemProvider , environmentService ) ) ;
177177 const workspaceService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , remoteAgentService ) ;
178178
179179 instantiationService . stub ( IWorkspaceContextService , workspaceService ) ;
@@ -233,7 +233,7 @@ suite('WorkspaceContextService - Workspace Editing', () => {
233233 const fileService = new FileService ( new NullLogService ( ) ) ;
234234 const diskFileSystemProvider = new DiskFileSystemProvider ( new NullLogService ( ) ) ;
235235 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
236- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , diskFileSystemProvider ) ) ;
236+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , diskFileSystemProvider , environmentService ) ) ;
237237 const workspaceService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , remoteAgentService ) ;
238238
239239 instantiationService . stub ( IWorkspaceContextService , workspaceService ) ;
@@ -494,7 +494,7 @@ suite('WorkspaceService - Initialization', () => {
494494 const fileService = new FileService ( new NullLogService ( ) ) ;
495495 const diskFileSystemProvider = new DiskFileSystemProvider ( new NullLogService ( ) ) ;
496496 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
497- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , diskFileSystemProvider ) ) ;
497+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , diskFileSystemProvider , environmentService ) ) ;
498498 const workspaceService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , remoteAgentService ) ;
499499 instantiationService . stub ( IWorkspaceContextService , workspaceService ) ;
500500 instantiationService . stub ( IConfigurationService , workspaceService ) ;
@@ -758,7 +758,7 @@ suite('WorkspaceConfigurationService - Folder', () => {
758758 const fileService = new FileService ( new NullLogService ( ) ) ;
759759 const diskFileSystemProvider = new DiskFileSystemProvider ( new NullLogService ( ) ) ;
760760 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
761- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , diskFileSystemProvider ) ) ;
761+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , diskFileSystemProvider , environmentService ) ) ;
762762 const workspaceService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , remoteAgentService ) ;
763763 instantiationService . stub ( IWorkspaceContextService , workspaceService ) ;
764764 instantiationService . stub ( IConfigurationService , workspaceService ) ;
@@ -1088,7 +1088,7 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
10881088 const fileService = new FileService ( new NullLogService ( ) ) ;
10891089 const diskFileSystemProvider = new DiskFileSystemProvider ( new NullLogService ( ) ) ;
10901090 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
1091- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , diskFileSystemProvider ) ) ;
1091+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , diskFileSystemProvider , environmentService ) ) ;
10921092 const workspaceService = new WorkspaceService ( { configurationCache : new ConfigurationCache ( environmentService ) } , environmentService , fileService , remoteAgentService ) ;
10931093
10941094 instantiationService . stub ( IWorkspaceContextService , workspaceService ) ;
@@ -1490,7 +1490,7 @@ suite('WorkspaceConfigurationService - Remote Folder', () => {
14901490 const remoteAgentService = instantiationService . stub ( IRemoteAgentService , < Partial < IRemoteAgentService > > { getEnvironment : ( ) => remoteEnvironmentPromise } ) ;
14911491 const fileService = new FileService ( new NullLogService ( ) ) ;
14921492 fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
1493- fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , dirname ( environmentService . appSettingsHome ) , diskFileSystemProvider ) ) ;
1493+ fileService . registerProvider ( Schemas . userData , new FileUserDataProvider ( environmentService . appSettingsHome , environmentService . backupHome , diskFileSystemProvider , environmentService ) ) ;
14941494 const configurationCache : IConfigurationCache = { read : ( ) => Promise . resolve ( '' ) , write : ( ) => Promise . resolve ( ) , remove : ( ) => Promise . resolve ( ) } ;
14951495 testObject = new WorkspaceService ( { configurationCache, remoteAuthority } , environmentService , fileService , remoteAgentService ) ;
14961496 instantiationService . stub ( IWorkspaceContextService , testObject ) ;
0 commit comments