Merge pull request #7422 from overleaf/em-bad-filetree

Cover more cases in bad filetree script

GitOrigin-RevId: 76aea86f56b16c60d3ed853e486bf00137f0ea5c
This commit is contained in:
Eric Mc Sween 2022-04-07 07:54:28 -04:00 committed by Copybot
parent 1b723b9cda
commit 97dca3de1c

View file

@ -18,6 +18,14 @@ async function main() {
} }
function processProject(project) { function processProject(project) {
if (!project.rootFolder || !Array.isArray(project.rootFolder)) {
console.log('BAD PATH:', project._id, 'rootFolder')
return
}
if (!project.rootFolder[0]) {
console.log('BAD PATH:', project._id, 'rootFolder.0')
return
}
const badPaths = findBadPaths(project.rootFolder[0]) const badPaths = findBadPaths(project.rootFolder[0])
for (const path of badPaths) { for (const path of badPaths) {
console.log('BAD PATH:', project._id, `rootFolder.0.${path}`) console.log('BAD PATH:', project._id, `rootFolder.0.${path}`)