summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMert Tumer <merttumer@outlook.com>2016-07-27 20:37:19 +0300
committerjan iversen <jani@documentfoundation.org>2016-08-28 07:13:01 +0000
commit5bdea25f681fb252967f99a22a38cce6be3c0b48 (patch)
treeab1ed55b84965590235e5b4490268d639132f1fd /android
parentc665e7f6304f0fa7b3f90dc8d5fc2ad186adaf64 (diff)
tdf#96771 - bug fix for owncloudfiles with white space characters
Change-Id: I373db55ed819ed5d2a574ba2590032ee628218f4 Reviewed-on: https://gerrit.libreoffice.org/27634 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
index 13c3d6c2ba34..73b3b2c6205d 100644
--- a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -2,7 +2,9 @@ package org.libreoffice.storage.owncloud;
import java.io.File;
import java.io.FileFilter;
+import java.io.UnsupportedEncodingException;
import java.net.URI;
+import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -38,8 +40,15 @@ public class OwnCloudFile implements IFile {
}
@Override
- public URI getUri() {
- return URI.create(file.getRemotePath());
+ public URI getUri(){
+
+ try{
+ return URI.create(URLEncoder.encode(file.getRemotePath(),"UTF-8"));
+ }catch(UnsupportedEncodingException e){
+ e.printStackTrace();
+ }
+
+ return null;
}
@Override