mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 07:09:02 +02:00
[web] remove unnecessary filtering of rootFolder (#31585)
11 years ago, the db.projects collection was storing doc lines in the
file-tree/rootFolder. Any operations on the project that did not need
those lines were benefitting from excluding all those entries from the
file-tree. These days, the verbose exclusions are not useful anymore and
merely add load on mongo.
REF: 9805c6a9ff
GitOrigin-RevId: 89f544688934c1ed1ca98877ffbe8baefe66c126
This commit is contained in:
@@ -269,8 +269,10 @@ async function mkdirp(projectId, path, userId, options = {}) {
|
||||
// to make matching case-sensitive
|
||||
const folders = path.split('/').filter(folder => folder.length !== 0)
|
||||
|
||||
const project =
|
||||
await ProjectGetter.promises.getProjectWithOnlyFolders(projectId)
|
||||
const project = await ProjectGetter.promises.getProjectWithoutLock(
|
||||
projectId,
|
||||
{ rootFolder: 1 }
|
||||
)
|
||||
if (path === '/') {
|
||||
return { newFolders: [], folder: project.rootFolder[0] }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user