Fixed: Rotating screen after viewing a file would return you to the
[pub/Android/ownCloud.git] / src / eu / alefzero / webdav / WebdavClient.java
index 66f27e4..f7cc060 100644 (file)
@@ -75,6 +75,12 @@ public class WebdavClient extends HttpClient {
     public boolean downloadFile(String filepath, File targetPath) {\r
         // HttpGet get = new HttpGet(mUri.toString() + filepath.replace(" ",\r
         // "%20"));\r
+        String[] splitted_filepath = filepath.split("/");\r
+        filepath = "";\r
+        for (String s : splitted_filepath) {\r
+            if (s.equals("")) continue;\r
+            filepath += "/" + URLEncoder.encode(s);\r
+        }\r
 \r
         Log.e("ASD", mUri.toString() + filepath.replace(" ", "%20") + "");\r
         GetMethod get = new GetMethod(mUri.toString()\r