allow modules to be sym links

This commit is contained in:
Stewart Allen 2020-01-26 13:21:13 -05:00
commit 0a388b4887

View file

@ -1050,7 +1050,8 @@ function loadModule(dir) {
lastmod("mod") && fs.readdirSync(currentDir + "/mod").forEach(dir => {
const fullpath = currentDir + "/mod/" + dir;
if (dir.charAt(0) === '.') return;
if (!fs.lstatSync(fullpath).isDirectory()) return;
const stats = fs.lstatSync(fullpath);
if (!(stats.isDirectory() || stats.isSymbolicLink())) return;
loadModule(fullpath);
});