From 00afd77a2182ece3d9522d41b86b4ddd7e132288 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Thu, 19 May 2011 17:13:50 -0400 Subject: [PATCH] Owner editing. Frozen status. Grouped repositories. Documentation. --- src/com/gitblit/utils/StringUtils.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java index ff47a51..8b7960b 100644 --- a/src/com/gitblit/utils/StringUtils.java +++ b/src/com/gitblit/utils/StringUtils.java @@ -107,4 +107,11 @@ throw new RuntimeException(t); } } + + public static String getRootPath(String path) { + if (path.indexOf('/') > -1) { + return path.substring(0, path.indexOf('/')); + } + return ""; + } } -- Gitblit v1.9.1