We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b59978b commit db767dfCopy full SHA for db767df
1 file changed
packages/sumi-core/src/server/core/filesystem.ts
@@ -11,11 +11,15 @@ export const filesystemDeferred = new Deferred<void>();
11
export const isFilesystemReady = () => filesystemDeferred.promise;
12
13
let mountfs: RootFS | null = null;
14
+let mountfsDeferred: Deferred<RootFS> | null = null;
15
16
export const initializeRootFileSystem = async () => {
- if (mountfs) return mountfs;
17
+ if (mountfsDeferred) return mountfsDeferred.promise;
18
19
+ mountfsDeferred = new Deferred<RootFS>();
20
mountfs = (await createFileSystem(FileSystem.MountableFileSystem, {})) as RootFS;
21
+ mountfsDeferred.resolve(mountfs);
22
+
23
initialize(mountfs);
24
filesystemDeferred.resolve();
25
return mountfs;
0 commit comments