diff options
-rw-r--r-- | lib/internal/fs/utils.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 5ee94dae29..c614cb4880 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -131,7 +131,7 @@ function getDirents(path, [names, types], callback) { const name = names[i]; const idx = i; toFinish++; - lazyLoadFs().stat(pathModule.resolve(path, name), (err, stats) => { + lazyLoadFs().lstat(pathModule.join(path, name), (err, stats) => { if (err) { callback(err); return; @@ -154,7 +154,7 @@ function getDirents(path, [names, types], callback) { const type = types[i]; if (type === UV_DIRENT_UNKNOWN) { const name = names[i]; - const stats = lazyLoadFs().statSync(pathModule.resolve(path, name)); + const stats = lazyLoadFs().lstatSync(pathModule.join(path, name)); names[i] = new DirentFromStats(name, stats); } else { names[i] = new Dirent(names[i], types[i]); |