From 65d4270b188ae7b6b3ef7a70fca35c4d7e7696af Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 9 Jun 2014 14:01:44 -0400 Subject: [PATCH] Fix substring regression in repository name panel --- .../java/com/gitblit/wicket/panels/RepositoryNamePanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.5