mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
test: fix inf loop if dirname results in same dir, ie \
This commit is contained in:
@@ -81,7 +81,11 @@ async function checkSymLinks(folder) {
|
||||
if (stat.isSymbolicLink()) {
|
||||
throw new Error('[[invalid-path]]');
|
||||
}
|
||||
dir = path.dirname(dir);
|
||||
const newDir = path.dirname(dir);
|
||||
if (newDir === dir) {
|
||||
break;
|
||||
}
|
||||
dir = newDir;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user