Author: toad
Date: 2007-12-22 23:12:29 +0000 (Sat, 22 Dec 2007)
New Revision: 16797

Modified:
   trunk/freenet/src/freenet/keys/USK.java
Log:
Don't turn SSK at .../site-<number>/ into USK at .../site/-<number>/.
Fixes bug: site name without a slash redirects to USK at .../-<edition number>/.
Which in turn fixes 
Frost-site-takes-ages-to-load-from-link-on-default-bookmarks, since the default 
bookmarks had it without the slash!

Modified: trunk/freenet/src/freenet/keys/USK.java
===================================================================
--- trunk/freenet/src/freenet/keys/USK.java     2007-12-22 23:07:02 UTC (rev 
16796)
+++ trunk/freenet/src/freenet/keys/USK.java     2007-12-22 23:12:29 UTC (rev 
16797)
@@ -150,6 +150,7 @@
                        String doc = uri.getDocName();
                        doc = doc.substring(siteName.length());
                        if(doc.length() < 2 || doc.charAt(0) != '-') return uri;
+                       doc = doc.substring(1);
                        long edition;
                        try {
                                edition = Long.parseLong(doc);


Reply via email to