I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit e5186b0f authored by zzz's avatar zzz
Browse files

Improve error handling on sort

parent fd621935
No related branches found
No related tags found
No related merge requests found
......@@ -288,18 +288,16 @@ public class I2PDefaultServlet extends DefaultServlet
}
public int compare(String a, String b) {
Resource ra, rb;
try {
ra = _base.addPath(a);
rb = _base.addPath(b);
} catch (Exception e) {
Resource ra = _base.addPath(a);
Resource rb = _base.addPath(b);
boolean da = ra.isDirectory();
boolean db = rb.isDirectory();
if (da && !db) return -1;
if (!da && db) return 1;
} catch (Exception e) {
// see above
return 0;
}
boolean da = ra.isDirectory();
boolean db = rb.isDirectory();
if (da && !db) return -1;
if (!da && db) return 1;
return _coll.compare(a, b);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment