提交 81294121 编写于 作者: K Kohsuke Kawaguchi

follow up fix to c51114a1.

This still is slightly more robust than the original in the sense that it's not affected by the presence/absence of the trailing '/' in itUrl.

----------------------
Comment from @ohtake:

getContextPath() will return "" if Jenkins is served at ROOT.

Assume that getContextPath() => "", itUrl => "iturl" and urlName => "urlName",
value returned was "/iturl/urlName", but is "iturl/urlName" (no slash at 0).
上级 a296b000
......@@ -1204,7 +1204,7 @@ public class Functions {
return joinPath(Stapler.getCurrentRequest().getContextPath(),urlName);
else
// relative URL name
return joinPath(Stapler.getCurrentRequest().getContextPath(),itUrl,urlName);
return joinPath(Stapler.getCurrentRequest().getContextPath()+'/'+itUrl,urlName);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册