aboutsummaryrefslogtreecommitdiff
path: root/src/library_fs.js
diff options
context:
space:
mode:
authorSathyanarayanan Gunasekaran <gsathya.ceg@gmail.com>2014-06-17 00:04:45 -0700
committerSathyanarayanan Gunasekaran <gsathya.ceg@gmail.com>2014-06-17 00:04:45 -0700
commit59fb70c9dbde86edf4d7406a645db0dbb66e0c07 (patch)
tree5c8f279b8898e31c5dcc441b9cb6206639b2ef31 /src/library_fs.js
parent7c26bbdb7d3c40d68777cc93f54ebfa5355a48bc (diff)
don't open files with empty path
Diffstat (limited to 'src/library_fs.js')
-rw-r--r--src/library_fs.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library_fs.js b/src/library_fs.js
index d825892c..a75dab97 100644
--- a/src/library_fs.js
+++ b/src/library_fs.js
@@ -932,6 +932,9 @@ mergeInto(LibraryManager.library, {
});
},
open: function(path, flags, mode, fd_start, fd_end) {
+ if (path === "") {
+ throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+ }
flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags;
mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode;
if ((flags & {{{ cDefine('O_CREAT') }}})) {