]> source.dussan.org Git - gitblit.git/commitdiff
Fix backslash regression in relative path determiniation
authorJames Moger <james.moger@gitblit.com>
Mon, 13 Oct 2014 22:06:28 +0000 (18:06 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 13 Oct 2014 23:19:15 +0000 (19:19 -0400)
src/main/java/com/gitblit/utils/FileUtils.java

index 27caa7eab20c6b929b2e3335f3bc4e6b49fdd3ab..e7f010455f01ea957b392051748ca156f89d8c0b 100644 (file)
@@ -296,7 +296,7 @@ public class FileUtils {
                Path exactBase = Paths.get(getExactFile(basePath).toURI());\r
                Path exactPath = Paths.get(getExactFile(path).toURI());\r
                if (exactPath.startsWith(exactBase)) {\r
-                       return exactBase.relativize(exactPath).toString();\r
+                       return exactBase.relativize(exactPath).toString().replace('\\', '/');\r
                }\r
                // no relative relationship\r
                return null;\r