Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! more simplify
  • Loading branch information
himself65 committed Sep 29, 2020
commit 2177cf65f3fc90f6766808b8421cd8a97abecb30
6 changes: 3 additions & 3 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ function realpathSync(p, options) {
pos = current.length;

// On windows, check that the root exists. On unix there is no need.
if (isWindows && !knownHard[base]) {
if (isWindows) {
const ctx = { path: base };
binding.lstat(pathModule.toNamespacedPath(base), false, undefined, ctx);
handleErrorFromBinding(ctx);
Expand Down Expand Up @@ -1828,7 +1828,7 @@ function realpath(p, options, callback) {
const ino = stats.ino.toString(32);
id = `${dev}:${ino}`;
if (seenLinks[id]) {
return gotTarget(null, seenLinks[id], base);
return gotTarget(null, seenLinks[id]);
}
}
fs.stat(base, (err) => {
Expand All @@ -1841,7 +1841,7 @@ function realpath(p, options, callback) {
});
}

function gotTarget(err, target, base) {
function gotTarget(err, target) {
if (err) return callback(err);

gotResolvedLink(pathModule.resolve(previous, target));
Expand Down