Merge pull request #12848 from overleaf/bg-fix-path-exception

add exception handling for  path.join in ProjectEntityHandler

GitOrigin-RevId: dad305057fd6b2821525ca5b6d1933824989e241
This commit is contained in:
Brian Gough
2023-05-02 09:18:57 +01:00
committed by Copybot
parent b8ebb5cd9e
commit 0367deb018
7 changed files with 291 additions and 27 deletions
@@ -394,8 +394,13 @@ const ProjectController = {
if (err != null) {
return next(err)
}
const { docs, files } =
ProjectEntityHandler.getAllEntitiesFromProject(project)
let docs, files
try {
;({ docs, files } =
ProjectEntityHandler.getAllEntitiesFromProject(project))
} catch (err) {
return next(err)
}
const entities = docs
.concat(files)
// Sort by path ascending