Skip to content
Snippets Groups Projects
Commit 4d0eb171 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix path encoding for 3rd party provided ones

parent 3aa9c656
No related branches found
No related tags found
No related merge requests found
......@@ -91,9 +91,8 @@ public class FileUtils {
public static Uri convertLocalUri(Uri uri) {
if (!TextUtils.equals(uri.getScheme(), "file") || !uri.getPath().startsWith("/sdcard"))
return uri;
String path = uri.getPath();
path = path.replace("/sdcard", AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY);
return Uri.parse("file://"+path);
String path = uri.toString();
return Uri.parse(path.replace("/sdcard", AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY));
}
public static String getPathFromURI(Uri contentUri) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment