@@ -120,10 +120,20 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
120120 const mainProcessService = new MainProcessService ( server , mainRouter ) ;
121121 services . set ( IMainProcessService , mainProcessService ) ;
122122
123- const configurationService = new ConfigurationService ( environmentService . settingsResource ) ;
123+ // Files
124+ const fileService = new FileService ( logService ) ;
125+ services . set ( IFileService , fileService ) ;
126+ disposables . add ( fileService ) ;
127+ const diskFileSystemProvider = new DiskFileSystemProvider ( logService ) ;
128+ disposables . add ( diskFileSystemProvider ) ;
129+ fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
130+
131+ // Configuration
132+ const configurationService = new ConfigurationService ( environmentService . settingsResource , fileService ) ;
124133 disposables . add ( configurationService ) ;
125134 await configurationService . initialize ( ) ;
126135
136+ // Storage
127137 const storageService = new NativeStorageService ( new GlobalStorageDatabaseChannelClient ( mainProcessService . getChannel ( 'storage' ) ) , logService , environmentService ) ;
128138 await storageService . initialize ( ) ;
129139 services . set ( IStorageService , storageService ) ;
@@ -136,19 +146,9 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
136146 services . set ( IRequestService , new SyncDescriptor ( RequestService ) ) ;
137147 services . set ( ILoggerService , new SyncDescriptor ( LoggerService ) ) ;
138148
139-
140149 const electronService = createChannelSender < IElectronService > ( mainProcessService . getChannel ( 'electron' ) , { context : configuration . windowId } ) ;
141150 services . set ( IElectronService , electronService ) ;
142151
143- // Files
144- const fileService = new FileService ( logService ) ;
145- services . set ( IFileService , fileService ) ;
146- disposables . add ( fileService ) ;
147-
148- const diskFileSystemProvider = new DiskFileSystemProvider ( logService ) ;
149- disposables . add ( diskFileSystemProvider ) ;
150- fileService . registerProvider ( Schemas . file , diskFileSystemProvider ) ;
151-
152152 services . set ( IDownloadService , new SyncDescriptor ( DownloadService ) ) ;
153153
154154 const instantiationService = new InstantiationService ( services ) ;
0 commit comments