Skip to content

Commit e77fa17

Browse files
committed
Revert c73aa1a
Fixes #4878
1 parent fe5560e commit e77fa17

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

opengrok-web/src/main/java/org/opengrok/web/PageConfig.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,15 @@ public boolean isNotModified(HttpServletRequest request, HttpServletResponse res
18451845
return false;
18461846
}
18471847

1848+
/**
1849+
* @param root root path
1850+
* @param path path
1851+
* @return path relative to root
1852+
*/
1853+
public static String getRelativePath(String root, String path) {
1854+
return Paths.get(root).relativize(Paths.get(path)).toString();
1855+
}
1856+
18481857
@VisibleForTesting @NotNull String getEtag() {
18491858
return String.format("W/\"%s\"",
18501859
Objects.hash(

0 commit comments

Comments
 (0)