diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-09 20:09:45 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-09 20:47:55 -0700 |
commit | 86097bafbe336131ba9cf2d8d8d2fd1a8774e570 (patch) | |
tree | aba1ca83fda1b2c90921a2b0a7a733cc001d2843 /src/library.js | |
parent | fa307241513ecc2e9a7711c79ed0b3a7e321f686 (diff) |
init runtime immediately, so that even with noInitialRun we can still call filesystem-using functions and they will work
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index 56583c76..19b8e90f 100644 --- a/src/library.js +++ b/src/library.js @@ -26,7 +26,8 @@ LibraryManager.library = { _impure_ptr: 0, $FS__deps: ['$ERRNO_CODES', '__setErrNo', 'stdin', 'stdout', 'stderr', '_impure_ptr'], - $FS__postset: '__ATINIT__.unshift({ func: function() { FS.ignorePermissions = false; if (!FS.init.initialized) FS.init() } });' + + $FS__postset: '__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });' + + '__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });' + '__ATEXIT__.push({ func: function() { FS.quit() } });', $FS: { // The path to the current folder. |