mirror of
https://github.com/etesync/android
synced 2024-11-29 11:28:19 +00:00
Fix invalid URLs one more time
This commit is contained in:
parent
b802ed07d9
commit
66d6ec34d1
@ -97,7 +97,7 @@ public class WebDavResource {
|
||||
public WebDavResource(URI baseURL, boolean trailingSlash) throws URISyntaxException {
|
||||
location = baseURL.normalize();
|
||||
|
||||
if (trailingSlash && !location.getPath().endsWith("/"))
|
||||
if (trailingSlash && !location.getRawPath().endsWith("/"))
|
||||
location = new URI(location.getScheme(), location.getSchemeSpecificPart() + "/", null);
|
||||
|
||||
// create new HTTP client
|
||||
@ -200,7 +200,7 @@ public class WebDavResource {
|
||||
/* file hierarchy methods */
|
||||
|
||||
public String getName() {
|
||||
String[] names = StringUtils.split(location.getPath(), "/");
|
||||
String[] names = StringUtils.split(location.getRawPath(), "/");
|
||||
return names[names.length - 1];
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ public class WebDavResource {
|
||||
|
||||
multiget.hrefs = new ArrayList<DavHref>(names.length);
|
||||
for (String name : names)
|
||||
multiget.hrefs.add(new DavHref(location.resolve(name).getPath()));
|
||||
multiget.hrefs.add(new DavHref(location.resolve(name).getRawPath()));
|
||||
|
||||
Serializer serializer = new Persister();
|
||||
StringWriter writer = new StringWriter();
|
||||
|
Loading…
Reference in New Issue
Block a user