From b236d715383920b7c92c035dcf769114011fa426 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 13 Oct 2014 18:06:28 -0400 Subject: [PATCH] Fix backslash regression in relative path determiniation --- src/main/java/com/gitblit/utils/FileUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/utils/FileUtils.java b/src/main/java/com/gitblit/utils/FileUtils.java index 27caa7ea..e7f01045 100644 --- a/src/main/java/com/gitblit/utils/FileUtils.java +++ b/src/main/java/com/gitblit/utils/FileUtils.java @@ -296,7 +296,7 @@ public class FileUtils { Path exactBase = Paths.get(getExactFile(basePath).toURI()); Path exactPath = Paths.get(getExactFile(path).toURI()); if (exactPath.startsWith(exactBase)) { - return exactBase.relativize(exactPath).toString(); + return exactBase.relativize(exactPath).toString().replace('\\', '/'); } // no relative relationship return null; -- 2.39.5