From: purigarcia Date: Thu, 9 Jul 2015 07:30:30 +0000 (+0200) Subject: encode the path X-Git-Tag: oc-android-1.8~54^2~5 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/569625c677b131345631b15abece43b7a40d3267?ds=inline;hp=--cc encode the path --- 569625c677b131345631b15abece43b7a40d3267 diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index 75fae370..e1568523 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -187,12 +187,14 @@ public class FileOperationsHelper { public void sendDownloadedFile(OCFile file) { if (file != null) { + String storagePath = file.getStoragePath(); + String encodedStoragePath = WebdavUtils.encodePath(storagePath); Intent sendIntent = new Intent(android.content.Intent.ACTION_SEND); // set MimeType sendIntent.setType(file.getMimetype()); - sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file.getStoragePath())); + sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + encodedStoragePath)); sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action - + // Show dialog, without the own app String[] packagesToExclude = new String[] { mFileActivity.getPackageName() }; DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude, file);