mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
mkdirp only needs folder strucutre
This commit is contained in:
parent
1d76850ebd
commit
1278081b51
2 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ module.exports = ProjectEntityHandler =
|
||||||
folders = _.select folders, (folder)->
|
folders = _.select folders, (folder)->
|
||||||
return folder.length != 0
|
return folder.length != 0
|
||||||
|
|
||||||
ProjectGetter.getProjectWithoutDocLines project_id, (err, project)=>
|
ProjectGetter.getProjectWithOnlyFolders project_id, (err, project)=>
|
||||||
if path == '/'
|
if path == '/'
|
||||||
logger.log project_id: project._id, "mkdir is only trying to make path of / so sending back root folder"
|
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])
|
return callback(null, [], project.rootFolder[0])
|
||||||
|
|
|
@ -79,7 +79,7 @@ describe 'ProjectEntityHandler', ->
|
||||||
@parentFolder_id = "1jnjknjk"
|
@parentFolder_id = "1jnjknjk"
|
||||||
@newFolder = {_id:"newFolder_id_here"}
|
@newFolder = {_id:"newFolder_id_here"}
|
||||||
@lastFolder = {_id:"123das", folders:[]}
|
@lastFolder = {_id:"123das", folders:[]}
|
||||||
@ProjectGetter.getProjectWithoutDocLines = sinon.stub().callsArgWith(1, null, @project)
|
@ProjectGetter.getProjectWithOnlyFolders = sinon.stub().callsArgWith(1, null, @project)
|
||||||
@projectLocator.findElementByPath = (project_id, path, cb)=>
|
@projectLocator.findElementByPath = (project_id, path, cb)=>
|
||||||
@parentFolder = {_id:"parentFolder_id_here"}
|
@parentFolder = {_id:"parentFolder_id_here"}
|
||||||
lastFolder = path.substring(path.lastIndexOf("/"))
|
lastFolder = path.substring(path.lastIndexOf("/"))
|
||||||
|
|
Loading…
Reference in a new issue