@@ -114,9 +114,9 @@ export class BackupFileService implements IBackupFileService {
114114 @IWorkbenchEnvironmentService environmentService : IWorkbenchEnvironmentService ,
115115 @IFileService fileService : IFileService
116116 ) {
117- const backupWorkspacePath = environmentService . configuration . backupPath ;
118- if ( backupWorkspacePath ) {
119- this . impl = new BackupFileServiceImpl ( backupWorkspacePath , this . hashPath , environmentService , fileService ) ;
117+ const backupWorkspaceResource = environmentService . configuration . backupWorkspaceResource ;
118+ if ( backupWorkspaceResource ) {
119+ this . impl = new BackupFileServiceImpl ( backupWorkspaceResource , this . hashPath , environmentService , fileService ) ;
120120 } else {
121121 this . impl = new InMemoryBackupFileService ( this . hashPath ) ;
122122 }
@@ -127,9 +127,9 @@ export class BackupFileService implements IBackupFileService {
127127 return hash ( str ) . toString ( 16 ) ;
128128 }
129129
130- initialize ( backupWorkspacePath : string ) : void {
130+ initialize ( backupWorkspaceResource : URI ) : void {
131131 if ( this . impl instanceof BackupFileServiceImpl ) {
132- this . impl . initialize ( backupWorkspacePath ) ;
132+ this . impl . initialize ( backupWorkspaceResource ) ;
133133 }
134134 }
135135
@@ -181,19 +181,19 @@ class BackupFileServiceImpl implements IBackupFileService {
181181 private ioOperationQueues : ResourceQueue ; // queue IO operations to ensure write order
182182
183183 constructor (
184- backupWorkspacePath : string ,
184+ backupWorkspaceResource : URI ,
185185 private readonly hashPath : ( resource : URI ) => string ,
186186 @IWorkbenchEnvironmentService private readonly environmentService : IWorkbenchEnvironmentService ,
187187 @IFileService private readonly fileService : IFileService
188188 ) {
189189 this . isShuttingDown = false ;
190190 this . ioOperationQueues = new ResourceQueue ( ) ;
191191
192- this . initialize ( backupWorkspacePath ) ;
192+ this . initialize ( backupWorkspaceResource ) ;
193193 }
194194
195- initialize ( backupWorkspacePath : string ) : void {
196- this . backupWorkspacePath = joinPath ( this . environmentService . userRoamingDataHome , relativePath ( URI . file ( this . environmentService . userDataPath ) , URI . file ( backupWorkspacePath ) ) ! ) ;
195+ initialize ( backupWorkspaceResource : URI ) : void {
196+ this . backupWorkspacePath = joinPath ( this . environmentService . userRoamingDataHome , relativePath ( URI . file ( this . environmentService . userDataPath ) , backupWorkspaceResource ) ! ) ;
197197
198198 this . ready = this . init ( ) ;
199199 }
0 commit comments