From 790c3829edafcb41d6eeb14301a23db22c559e96 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Fri, 01 Jul 2011 17:45:23 -0400 Subject: [PATCH] Documentation. Added upgrade info to site. Moved todos to GoogleCode. --- src/com/gitblit/DownloadZipServlet.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/gitblit/DownloadZipServlet.java b/src/com/gitblit/DownloadZipServlet.java index 1745474..d36b94d 100644 --- a/src/com/gitblit/DownloadZipServlet.java +++ b/src/com/gitblit/DownloadZipServlet.java @@ -41,10 +41,10 @@ } public static String asLink(String baseURL, String repository, String objectId, String path) { - if (baseURL.charAt(baseURL.length() - 1) == '/') { + if (baseURL.length() > 0 && baseURL.charAt(baseURL.length() - 1) == '/') { baseURL = baseURL.substring(0, baseURL.length() - 1); } - return baseURL + Constants.ZIP_SERVLET_PATH + "?r=" + repository + return baseURL + Constants.ZIP_PATH + "?r=" + repository + (path == null ? "" : ("&p=" + path)) + (objectId == null ? "" : ("&h=" + objectId)); } -- Gitblit v1.9.1