mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 01:05:50 +00:00
Revert "Add error handling in mkdir_p"
This reverts commit c2458cd19018fe05199ce3b33fd4e9230d1cf319. Apparently mkdirp needs errors to be ignored to work...
This commit is contained in:
parent
4d0fe3bf5d
commit
3fe0674462
1 changed files with 0 additions and 3 deletions
|
@ -242,7 +242,6 @@ module.exports = ProjectEntityHandler =
|
|||
return folder.length != 0
|
||||
|
||||
ProjectGetter.getProjectWithOnlyFolders project_id, (err, project)=>
|
||||
return callback(err) if err?
|
||||
if path == '/'
|
||||
logger.log project_id: project._id, "mkdir is only trying to make path of / so sending back root folder"
|
||||
return callback(null, [], project.rootFolder[0])
|
||||
|
@ -256,11 +255,9 @@ module.exports = ProjectEntityHandler =
|
|||
parentFolder_id = parentFolder._id
|
||||
builtUpPath = "#{builtUpPath}/#{folderName}"
|
||||
projectLocator.findElementByPath project, builtUpPath, (err, foundFolder)=>
|
||||
return callback(err) if err?
|
||||
if !foundFolder?
|
||||
logger.log path:path, project_id:project._id, folderName:folderName, "making folder from mkdirp"
|
||||
@addFolder project_id, parentFolder_id, folderName, (err, newFolder, parentFolder_id)->
|
||||
return callback(err) if err?
|
||||
newFolder.parentFolder_id = parentFolder_id
|
||||
previousFolders.push newFolder
|
||||
callback null, previousFolders
|
||||
|
|
Loading…
Reference in a new issue