Browse Source

fs: revert "change statSync to accessSync..."

This reverts commit 809bf5e38c
("change statSync to accessSync in realpathSync").

It was causing tests to fail on Windows CI.

Ref: https://github.com/nodejs/node/pull/4575
PR-URL: https://github.com/nodejs/node/pull/4679
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
process-exit-stdio-flushing
Rich Trott 9 years ago
parent
commit
3441a4178b
  1. 2
      lib/fs.js

2
lib/fs.js

@ -1550,7 +1550,7 @@ fs.realpathSync = function realpathSync(p, cache) {
} }
} }
if (linkTarget === null) { if (linkTarget === null) {
fs.accessSync(base, fs.F_OK); // Throws ELOOP on cyclic links. fs.statSync(base);
linkTarget = fs.readlinkSync(base); linkTarget = fs.readlinkSync(base);
} }
resolvedLink = pathModule.resolve(previous, linkTarget); resolvedLink = pathModule.resolve(previous, linkTarget);

Loading…
Cancel
Save