Merge pull request #2768 from natcl/librarySymlinks

Library: properly handle symlinked folders
This commit is contained in:
Nick O'Leary
2020-11-25 21:07:50 +00:00
committed by GitHub

View File

@@ -102,7 +102,8 @@ function getLibraryEntry(type,path) {
var files = [];
fns.sort().filter(function(fn) {
var fullPath = fspath.join(path,fn);
var absoluteFullPath = fspath.join(root,fullPath);
// we use fs.realpathSync to also resolve Symbolic Link
var absoluteFullPath = fs.realpathSync(fspath.join(root,fullPath));
if (fn[0] != ".") {
var stats = fs.lstatSync(absoluteFullPath);
if (stats.isDirectory()) {