From: Bartek Przybylski Date: Wed, 23 May 2012 17:35:50 +0000 (+0200) Subject: fix download file with noascii chars in name X-Git-Tag: oc-android-1.4.3~395^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/700c9427cdc20a4ef434d8060ab318b7e2655a4f?ds=sidebyside fix download file with noascii chars in name --- diff --git a/src/eu/alefzero/webdav/WebdavClient.java b/src/eu/alefzero/webdav/WebdavClient.java index 66f27e49..f7cc060e 100644 --- a/src/eu/alefzero/webdav/WebdavClient.java +++ b/src/eu/alefzero/webdav/WebdavClient.java @@ -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()