diff options
author | James Moger <james.moger@gitblit.com> | 2011-05-28 17:05:34 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-05-28 17:05:34 -0400 |
commit | 28d6b2a860740557bf93dd0f9a48d059379ed696 (patch) | |
tree | 1a32491a9d2d42e08c40dc6707ff4cf6112a1771 /src/com/gitblit/wicket/pages/TreePage.java | |
parent | 1f9daef870a8c7a984955166a542628d69012ed5 (diff) | |
download | gitblit-28d6b2a860740557bf93dd0f9a48d059379ed696.tar.gz gitblit-28d6b2a860740557bf93dd0f9a48d059379ed696.zip |
Unit testing. Removal of some unused code paths.
Diffstat (limited to 'src/com/gitblit/wicket/pages/TreePage.java')
-rw-r--r-- | src/com/gitblit/wicket/pages/TreePage.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/gitblit/wicket/pages/TreePage.java b/src/com/gitblit/wicket/pages/TreePage.java index 4fc7119a..ac84e73a 100644 --- a/src/com/gitblit/wicket/pages/TreePage.java +++ b/src/com/gitblit/wicket/pages/TreePage.java @@ -65,7 +65,14 @@ public class TreePage extends RepositoryPage { // breadcrumbs
add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, path, objectId));
if (path != null && path.trim().length() > 0) {
- paths.add(0, PathModel.getParentPath(path, objectId));
+ // add .. parent path entry
+ String parentPath = null;
+ if (path.lastIndexOf('/') > -1) {
+ parentPath = path.substring(0, path.lastIndexOf('/'));
+ }
+ PathModel model = new PathModel("..", parentPath, 0, 40000, objectId);
+ model.isParentPath = true;
+ paths.add(0, model);
}
final ByteFormat byteFormat = new ByteFormat();
|