File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,6 +207,14 @@ export class ClientApp extends BasicClientApp {
207207 ] ) ;
208208 }
209209 }
210+
211+ unmountRootFS ( ) {
212+ const serverApp : IServerApp = this . injector . get ( IServerApp ) ;
213+ if ( serverApp ) {
214+ serverApp . unmountRootFS ( ) ;
215+ }
216+ }
217+
210218 async dispose ( ) {
211219 super . dispose ( ) ;
212220 this . disposer . dispose ( ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export const IServerApp = Symbol('IServerApp');
1919
2020export interface IServerApp {
2121 start ( ) : Promise < void > ;
22+ unmountRootFS ( ) : void ;
2223 rootFS : RootFS ;
2324}
2425
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import { RawMessageIO } from '@opensumi/ide-connection/lib/common/rpc/message-io
3131import { rawSerializer } from '@opensumi/ide-connection/lib/common/serializer/raw' ;
3232
3333import { IServerApp , HOME_ROOT } from '../../common' ;
34- import { initializeRootFileSystem , initializeHomeFileSystem } from './filesystem' ;
34+ import { initializeRootFileSystem , initializeHomeFileSystem , unmountRootFS } from './filesystem' ;
3535import { fsExtra as fse } from '../node' ;
3636import { WORKSPACE_ROOT , STORAGE_DIR } from '../../common/constant' ;
3737import { RootFS , RuntimeConfig } from '../../common/types' ;
@@ -238,6 +238,10 @@ export class ServerApp implements IServerApp {
238238 await this . startContribution ( ) ;
239239 }
240240
241+ unmountRootFS ( ) : void {
242+ unmountRootFS ( ) ;
243+ }
244+
241245 dispose ( ) {
242246 this . disposeCollection . dispose ( ) ;
243247 }
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ export const initializeRootFileSystem = async () => {
2121 return mountfs ;
2222} ;
2323
24+ export const unmountRootFS = ( ) => {
25+ if ( mountfs ) {
26+ // mountfs
27+ mountfs = null ;
28+ }
29+ }
30+
2431export const initializeHomeFileSystem = async ( rootFS : RootFS , scenario ?: string | null ) => {
2532 try {
2633 let homefs : FileSystem | null = null ;
You can’t perform that action at this time.
0 commit comments