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 18:06:28 -0400 |
commit | b236d715383920b7c92c035dcf769114011fa426 (patch) | |
tree | 4a17a8c1d3f4e5388aab319d093c8c6444c83887 /src/main | |
parent | 6e0cef9554c61d514ca368c85b512f85fd5be0f0 (diff) | |
download | gitblit-b236d715383920b7c92c035dcf769114011fa426.tar.gz gitblit-b236d715383920b7c92c035dcf769114011fa426.zip |
Fix backslash regression in relative path determiniation
Diffstat (limited to 'src/main')
-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;
|