diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-13 18:06:28 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-13 19:19:15 -0400 |
commit | 4cdc034f4d7e00f779b649988fa7914ab1cb4acc (patch) | |
tree | 595150999273191112ba1a627313f05a28f83f91 /src | |
parent | 461d90d607492d1b18ad8fa1e8a9984b2dc423f5 (diff) | |
download | gitblit-4cdc034f4d7e00f779b649988fa7914ab1cb4acc.tar.gz gitblit-4cdc034f4d7e00f779b649988fa7914ab1cb4acc.zip |
Fix backslash regression in relative path determiniation
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/utils/FileUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
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;
|