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>
This commit is contained in:
Mert Tumer
2016-07-27 20:37:19 +03:00
committed by jan iversen
parent c665e7f630
commit 5bdea25f68

View File

@@ -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