Skip to content

Commit

Permalink
fixup: id cannot be const
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Sep 10, 2016
1 parent f3e8373 commit c9954f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1642,9 +1642,10 @@ fs.realpathSync = function realpathSync(p, options) {

// read the link if it wasn't read before
// dev/ino always return 0 on windows, so skip the check.
var linkTarget = null;
let linkTarget = null;
let id;
if (!isWindows) {
const id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
if (seenLinks.hasOwnProperty(id)) {
linkTarget = seenLinks[id];
}
Expand Down Expand Up @@ -1760,8 +1761,9 @@ fs.realpath = function realpath(p, options, callback) {
// stat & read the link if not read before
// call gotTarget as soon as the link target is known
// dev/ino always return 0 on windows, so skip the check.
let id;
if (!isWindows) {
const id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
if (seenLinks.hasOwnProperty(id)) {
return gotTarget(null, seenLinks[id], base);
}
Expand Down

0 comments on commit c9954f4

Please sign in to comment.