mirror of https://github.com/etesync/android
* iCal4j 1.0.5 -> 1.0.5.2, iCal4j-vcard 0.9.5 -> 0.9.6.2 * handle relative URLs with colons in name (see issue 45)pull/2/head
parent
ff4fe77fe3
commit
fb671a67a4
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
package at.bitfire.davdroid;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class Utils {
|
||||
public static boolean isSameURL(URI a, URI b) {
|
||||
try {
|
||||
a = new URI(a.getScheme(), null, a.getHost(), a.getPort(), a.getPath(), a.getQuery(), a.getFragment());
|
||||
b = new URI(b.getScheme(), null, b.getHost(), b.getPort(), b.getPath(), b.getQuery(), b.getFragment());
|
||||
return a.equals(b);
|
||||
} catch (URISyntaxException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static URI resolveURI(URI parent, String member) {
|
||||
if (!member.startsWith("/"))
|
||||
member = "./" + member;
|
||||
|
||||
return parent.resolve(member);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue