From 6a85861b8abcedfc1de1d5e3fe3bfd3d70604def Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Mon, 28 Jul 2008 05:41:43 +0000 Subject: [PATCH] [MRM-891] remove leading ./ on links in index listing Submitted by: Dan Tran git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@680256 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/archiva/webdav/util/IndexWriter.java | 8 ++++++-- .../maven/archiva/webdav/RepositoryServletBrowseTest.java | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/IndexWriter.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/IndexWriter.java index 5500f1cc7..9e5149291 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/IndexWriter.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/IndexWriter.java @@ -19,6 +19,7 @@ package org.apache.maven.archiva.webdav.util; * under the License. */ +import org.apache.commons.lang.StringUtils; import org.apache.jackrabbit.webdav.DavResource; import org.apache.jackrabbit.webdav.io.OutputContext; @@ -92,6 +93,9 @@ public class IndexWriter { File file = new File(logicalResource); String parentName = file.getParent().equals("") ? "/" : file.getParent(); + + //convert to unix path in case archiva is hosted on windows + parentName = StringUtils.replace(parentName, "\\", "/" ); writer.println("