Include current path in "New UI" link

Bug: Issue 5912
Change-Id: Iad3d650bd0166dc2267752baf689027c419b4d30
(cherry picked from commit 7ed9690a91)
This commit is contained in:
Paladox none
2017-04-03 13:55:06 +00:00
committed by David Pursehouse
parent e248839c41
commit 91d23a44bc

View File

@@ -558,7 +558,10 @@ public class Gerrit implements EntryPoint {
builder.setPort(Integer.parseInt(port));
}
String[] tokens = token.split("@", 2);
builder.setPath(tokens[0]);
if (Location.getPath().endsWith("/") && tokens[0].startsWith("/")) {
tokens[0] = tokens[0].substring(1);
}
builder.setPath(Location.getPath() + tokens[0]);
if (tokens.length == 2) {
builder.setHash(tokens[1]);
}