mkdirp only needs folder strucutre

This commit is contained in:
Henry Oswald 2016-02-23 15:36:59 +00:00
parent 1d76850ebd
commit 1278081b51
2 changed files with 2 additions and 2 deletions

View file

@ -204,7 +204,7 @@ module.exports = ProjectEntityHandler =
folders = _.select folders, (folder)->
return folder.length != 0
ProjectGetter.getProjectWithoutDocLines project_id, (err, project)=>
ProjectGetter.getProjectWithOnlyFolders project_id, (err, project)=>
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])

View file

@ -79,7 +79,7 @@ describe 'ProjectEntityHandler', ->
@parentFolder_id = "1jnjknjk"
@newFolder = {_id:"newFolder_id_here"}
@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)=>
@parentFolder = {_id:"parentFolder_id_here"}
lastFolder = path.substring(path.lastIndexOf("/"))