mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
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:
@@ -1396,8 +1396,13 @@ const ProjectEntityUpdateHandler = {
|
||||
return callback(error)
|
||||
}
|
||||
|
||||
let { docs, files, folders } =
|
||||
ProjectEntityHandler.getAllEntitiesFromProject(project)
|
||||
let docs, files, folders
|
||||
try {
|
||||
;({ docs, files, folders } =
|
||||
ProjectEntityHandler.getAllEntitiesFromProject(project))
|
||||
} catch (error) {
|
||||
return callback(error)
|
||||
}
|
||||
// _checkFileTree() must be passed the folders before docs and
|
||||
// files
|
||||
ProjectEntityUpdateHandler._checkFiletree(
|
||||
@@ -1489,7 +1494,11 @@ const ProjectEntityUpdateHandler = {
|
||||
// the case only because getAllEntitiesFromProject() returns folders
|
||||
// in that order and resyncProjectHistory() calls us with the folders
|
||||
// first.
|
||||
adjustPathsAfterFolderRename(entity.path, newPath)
|
||||
try {
|
||||
adjustPathsAfterFolderRename(entity.path, newPath)
|
||||
} catch (error) {
|
||||
return callback(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user