Skip to content

Commit 920eb78

Browse files
committed
Return absolute path for scripts if contextPath is empty
Signed-off-by: Daniel Caminada <[email protected]>
1 parent bf0af47 commit 920eb78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/org/opensolaris/opengrok/web/Scripts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public Iterator<Script> iterator() {
202202
* @return true if script was added; false otherwise
203203
*/
204204
public boolean addScript(String contextPath, String scriptName) {
205-
contextPath = contextPath == null || contextPath.isEmpty() ? "" : contextPath + "/";
205+
contextPath = contextPath == null || contextPath.isEmpty() ? "/" : contextPath + "/";
206206
if (SCRIPTS.containsKey(scriptName)) {
207207
this.addScript(
208208
// put the context path end append the script path

0 commit comments

Comments
 (0)