Browse Source

Fix backslash regression in relative path determiniation

tags/v1.7.0
James Moger 9 years ago
parent
commit
4cdc034f4d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/main/java/com/gitblit/utils/FileUtils.java

+ 1
- 1
src/main/java/com/gitblit/utils/FileUtils.java View File

@@ -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;

Loading…
Cancel
Save