Merge pull request #331 from lukasbestle/patch-1

Use an ES5 compatible syntax for octal numbers
pull/2/head
Louis Chatriot 9 years ago
commit 02620d1316
  1. 4
      test_lac/loadAndCrash.test.js

@ -79,9 +79,9 @@ fs.writeFile = function(path, data, options, callback_) {
var callback = maybeCallback(arguments[arguments.length - 1]);
if (!options || typeof options === 'function') {
options = { encoding: 'utf8', mode: 0o666, flag: 'w' };
options = { encoding: 'utf8', mode: 438, flag: 'w' }; // Mode 438 == 0o666 (compatibility with older Node releases)
} else if (typeof options === 'string') {
options = { encoding: options, mode: 0o666, flag: 'w' };
options = { encoding: options, mode: 438, flag: 'w' }; // Mode 438 == 0o666 (compatibility with older Node releases)
} else if (typeof options !== 'object') {
throwOptionsError(options);
}

Loading…
Cancel
Save