Handle special characters in URIs better.

This commit is contained in:
Brian Pellin committed 2016-03-14 22:12:28 -05:00
1 parent 51f10a1c94
commit 897a716e99
1 file changed
+3 -1
@@ -98,6 +98,8 @@ public class UriUtil {
filepath = cursor.getString(0);
cursor.close();
if (!isValidFilePath(filepath)) {
filepath = null;
}
@@ -105,7 +107,7 @@ public class UriUtil {
// Try using the URI path as a straight file
if (EmptyUtils.isNullOrEmpty(filepath)) {
filepath = uri.getPath();
filepath = uri.getEncodedPath();
if (!isValidFilePath(filepath)) {
filepath = null;
}