Skip to content

Commit

Permalink
src: fs.realpath - normalize for Windows's sake
Browse files Browse the repository at this point in the history
  • Loading branch information
Refael Ackermann committed Sep 20, 2014
1 parent a649a4a commit 82392c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ fs.realpathSync = function realpathSync(p, cache) {
start();
}

p = path.normalize(p);
if (cache) cache[original] = p;

return p;
Expand Down Expand Up @@ -1372,6 +1373,7 @@ fs.realpath = function realpath(p, cache, cb) {
function LOOP() {
// stop if scanned past end of path
if (pos >= p.length) {
p = path.normalize(p);
if (cache) cache[original] = p;
return cb(null, p);
}
Expand Down

0 comments on commit 82392c7

Please sign in to comment.