diff options
author | James Moger <james.moger@gitblit.com> | 2014-06-27 23:31:09 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-06-27 23:31:09 -0400 |
commit | 9b89bf102d1fb2cb96ce96eec746a594e539125c (patch) | |
tree | e089392d4b048755eff319221498456a0157dbfa | |
parent | 5bcb9448de01e33c23d6cebfdc03164469d5bc3d (diff) | |
parent | 3983a120127805bff913f0dea3455b080a6de831 (diff) | |
download | gitblit-9b89bf102d1fb2cb96ce96eec746a594e539125c.tar.gz gitblit-9b89bf102d1fb2cb96ce96eec746a594e539125c.zip |
Merge branch 'ticket/118' into develop
-rw-r--r-- | src/main/java/com/gitblit/manager/ProjectManager.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/com/gitblit/manager/ProjectManager.java b/src/main/java/com/gitblit/manager/ProjectManager.java index b30f4f17..666f5210 100644 --- a/src/main/java/com/gitblit/manager/ProjectManager.java +++ b/src/main/java/com/gitblit/manager/ProjectManager.java @@ -178,19 +178,20 @@ public class ProjectManager implements IProjectManager { map.put("", configs.get("")); for (RepositoryModel model : repositoryManager.getRepositoryModels(user)) { - String rootPath = StringUtils.getRootPath(model.name).toLowerCase(); - if (!map.containsKey(rootPath)) { + String projectPath = StringUtils.getRootPath(model.name); + String projectKey = projectPath.toLowerCase(); + if (!map.containsKey(projectKey)) { ProjectModel project; - if (configs.containsKey(rootPath)) { + if (configs.containsKey(projectKey)) { // clone the project model because it's repository list will // be tailored for the requesting user - project = DeepCopier.copy(configs.get(rootPath)); + project = DeepCopier.copy(configs.get(projectKey)); } else { - project = new ProjectModel(rootPath); + project = new ProjectModel(projectPath); } - map.put(rootPath, project); + map.put(projectKey, project); } - map.get(rootPath).addRepository(model); + map.get(projectKey).addRepository(model); } // sort projects, root project first |