mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Fix fs.readFile handling encoding. Should close issue #72
This commit is contained in:
1 parent
0e844d3bcb
commit
548d59d07e
1 file changed
+1
-1
+1
-1
@@ -310,7 +310,7 @@ function readAll (fd, pos, content, encoding, callback) {
|
||||
}
|
||||
|
||||
process.fs.readFile = function (path, encoding_, callback) {
|
||||
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);
|
||||
process.fs.open(path, process.O_RDONLY, 0666, function (err, fd) {
|
||||
|
||||
Reference in new issue
Block a user