If urlChildPrefix is ".", do not prefix shortUrl with "./".

This commit is contained in:
Jesse Glick committed 2013-06-10 18:21:08 -04:00
1 parent c4e3adde15
commit e50f0f5fc2
1 file changed
+3 -1
@@ -401,7 +401,9 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
}
public String getShortUrl() {
return getParent().getUrlChildPrefix()+'/'+Util.rawEncode(getName())+'/';
String prefix = getParent().getUrlChildPrefix();
String subdir = Util.rawEncode(getName());
return prefix.equals(".") ? subdir : prefix+'/'+subdir+'/';
}
public String getSearchUrl() {