Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fixing #1774 about issues when running node with --harmony_block_scop…
Browse files Browse the repository at this point in the history
…ing v8 option

Fixes #1837.
  • Loading branch information
talltyler authored and koichik committed Oct 7, 2011
1 parent fcad5e3 commit 10f97f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/fs.js
Expand Up @@ -412,7 +412,7 @@ fs.readlinkSync = function(path) {
fs.symlink = function(destination, path, mode_, callback) {
var mode = (typeof(mode_) == 'string' ? mode_ : null);
var callback_ = arguments[arguments.length - 1];
var callback = (typeof(callback_) == 'function' ? callback_ : null);
callback = (typeof(callback_) == 'function' ? callback_ : null);
binding.symlink(destination, path, mode, callback);
};

Expand Down Expand Up @@ -564,7 +564,7 @@ function writeAll(fd, buffer, offset, length, callback) {
fs.writeFile = function(path, data, encoding_, callback) {
var encoding = (typeof(encoding_) == 'string' ? encoding_ : 'utf8');
var callback_ = arguments[arguments.length - 1];
var callback = (typeof(callback_) == 'function' ? callback_ : null);
callback = (typeof(callback_) == 'function' ? callback_ : null);
fs.open(path, 'w', 0666, function(openErr, fd) {
if (openErr) {
if (callback) callback(openErr);
Expand Down Expand Up @@ -747,7 +747,7 @@ if (isWindows) {

// windows version
fs.realpathSync = function realpathSync(p, cache) {
var p = path.resolve(p);
p = path.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
return cache[p];
}
Expand All @@ -762,7 +762,7 @@ if (isWindows) {
cb = cache;
cache = null;
}
var p = path.resolve(p);
p = path.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
return cb(null, cache[p]);
}
Expand Down

0 comments on commit 10f97f9

Please sign in to comment.