fix download file with noascii chars in name

This commit is contained in:
Bartek Przybylski 2012-05-23 19:35:50 +02:00
parent 449822818b
commit 700c9427cd
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ public class WebdavClient extends HttpClient {
public boolean downloadFile(String filepath, File targetPath) {
// HttpGet get = new HttpGet(mUri.toString() + filepath.replace(" ",
// "%20"));
String[] splitted_filepath = filepath.split("/");
filepath = "";
for (String s : splitted_filepath) {
if (s.equals("")) continue;
filepath += "/" + URLEncoder.encode(s);
}
Log.e("ASD", mUri.toString() + filepath.replace(" ", "%20") + "");
GetMethod get = new GetMethod(mUri.toString()