diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-16 12:09:19 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-16 12:09:19 -0800 |
commit | fbfcffe2ee61ed39598f883523455ad713690aea (patch) | |
tree | 9b193e6f280e39850dc0047e2002d4c770b594f6 /src/library.js | |
parent | 5fe3bcc54b6c7ee04d0b09cc3e44e0cd06b95405 (diff) |
remove hack for ignorePermissions in the filesystem API, which removes the need to set ignorePermissions to true before run() is called
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index 3c596ea1..bdaf3e00 100644 --- a/src/library.js +++ b/src/library.js @@ -26,7 +26,7 @@ LibraryManager.library = { _impure_ptr: 0, $FS__deps: ['$ERRNO_CODES', '__setErrNo', 'stdin', 'stdout', 'stderr', '_impure_ptr'], - $FS__postset: 'FS.init(); __ATEXIT__.push({ func: function() { FS.quit() } });', + $FS__postset: '__ATINIT__.push({ func: function() { FS.ignorePermissions = false } }); FS.init(); __ATEXIT__.push({ func: function() { FS.quit() } });', $FS: { // The path to the current folder. currentPath: '/', @@ -39,6 +39,8 @@ LibraryManager.library = { streams: [null], // Whether we are currently ignoring permissions. Useful when preparing the // filesystem and creating files inside read-only folders. + // This is set to false when the runtime is initialized, allowing you + // to modify the filesystem freely before run() is called. ignorePermissions: true, // Converts any path to an absolute path. Resolves embedded "." and ".." // parts. |