From: James Moger Date: Mon, 9 Jun 2014 18:01:44 +0000 (-0400) Subject: Fix substring regression in repository name panel X-Git-Tag: v1.6.0~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=65d4270b188ae7b6b3ef7a70fca35c4d7e7696af;p=gitblit.git Fix substring regression in repository name panel --- diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java index d3e493ed..f381a45e 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java @@ -84,10 +84,11 @@ public class RepositoryNamePanel extends BasePanel { // set the defaultProject to the current repository project if (StringUtils.isEmpty(repository.projectPath)) { defaultPath = "/"; + defaultName = repository.name; } else { defaultPath = repository.projectPath + "/"; + defaultName = repository.name.substring(defaultPath.length()); } - defaultName = repository.name.substring(defaultPath.length()); pathNames.add(defaultPath); }