]> source.dussan.org Git - gitblit.git/commitdiff
Fix substring regression in repository name panel
authorJames Moger <james.moger@gitblit.com>
Mon, 9 Jun 2014 18:01:44 +0000 (14:01 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 9 Jun 2014 18:01:44 +0000 (14:01 -0400)
src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java

index d3e493ed60d697c7c3e111fc2b5fdbef8176a456..f381a45ec7c54de9573328bbf99baaa7a8c94613 100644 (file)
@@ -84,10 +84,11 @@ public class RepositoryNamePanel extends BasePanel {
                        // set the defaultProject to the current repository project\r
                        if (StringUtils.isEmpty(repository.projectPath)) {\r
                                defaultPath = "/";\r
+                               defaultName = repository.name;\r
                        } else {\r
                                defaultPath = repository.projectPath + "/";\r
+                               defaultName = repository.name.substring(defaultPath.length());\r
                        }\r
-                       defaultName = repository.name.substring(defaultPath.length());\r
                        pathNames.add(defaultPath);\r
                }\r
 \r