mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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()) {
|
if (stat.isSymbolicLink()) {
|
||||||
throw new Error('[[invalid-path]]');
|
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