Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[js] Minimal patch to make basic file open modes work again
  • Loading branch information
cygx committed Oct 6, 2015
1 parent 09ae178 commit c2610de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/js/nqp-runtime/io.js
Expand Up @@ -102,7 +102,7 @@ FileHandle.prototype.$$to_bool = function(ctx) {
};

op.open = function(name, mode) {
var modes = {r: 'r', w: 'w', wa: 'a'};
var modes = {r: 'r', w: 'w', wa: 'a', '-ct': 'w', '-ca': 'a'};
if (!modes[mode]) { throw 'unknown mode to open: ' + mode }
var fh = new FileHandle(fs.openSync(name, modes[mode]));
fh.encoding = 'utf8';
Expand Down

0 comments on commit c2610de

Please sign in to comment.