Skip to content

Commit

Permalink
Fix backslash regression in relative path determiniation
Browse files Browse the repository at this point in the history
  • Loading branch information
gitblit committed Oct 13, 2014
1 parent 6e0cef9 commit b236d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/gitblit/utils/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public static String getRelativePath(File basePath, File path) {
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;
Expand Down

0 comments on commit b236d71

Please sign in to comment.