From 6eff8937d7a98d9c4b58bcabaa84c6b9384b2968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 21 Feb 2010 08:21:23 -0500 Subject: [PATCH] Fixed encoding in fs.writeFile(). --- src/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.js b/src/node.js index 415df7b453..046d614769 100644 --- a/src/node.js +++ b/src/node.js @@ -518,7 +518,7 @@ var fsModule = createInternalModule("fs", function (exports) { } exports.writeFile = function (path, data, encoding_) { - var encoding = (typeof(encoding) == 'string' ? encoding_ : 'utf8'); + var encoding = (typeof(encoding_) == 'string' ? encoding_ : 'utf8'); var callback_ = arguments[arguments.length - 1]; var callback = (typeof(callback_) == 'function' ? callback_ : null); exports.open(path, 'w', 0666, function (openErr, fd) {