aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/thialfihar/android/apg/DataSource.java
diff options
context:
space:
mode:
authorThialfihar <thialfihar@gmail.com>2010-08-17 12:50:42 +0000
committerThialfihar <thialfihar@gmail.com>2010-08-17 12:50:42 +0000
commit96162b660840c7bcfb6dec1bb6e3ade5f715c563 (patch)
tree6f19c8292355de1ebc2706b6dee94006a20760fc /src/org/thialfihar/android/apg/DataSource.java
parent6e9146c91ab9ec78837fa9ba7e21e2c01b72907f (diff)
downloadopen-keychain-96162b660840c7bcfb6dec1bb6e3ade5f715c563.tar.gz
open-keychain-96162b660840c7bcfb6dec1bb6e3ade5f715c563.tar.bz2
open-keychain-96162b660840c7bcfb6dec1bb6e3ade5f715c563.zip
properly URI-decode file:// URIs, so the files can be found
Fixes issues 63
Diffstat (limited to 'src/org/thialfihar/android/apg/DataSource.java')
-rw-r--r--src/org/thialfihar/android/apg/DataSource.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/thialfihar/android/apg/DataSource.java b/src/org/thialfihar/android/apg/DataSource.java
index 34583ab59..3ad1d0b07 100644
--- a/src/org/thialfihar/android/apg/DataSource.java
+++ b/src/org/thialfihar/android/apg/DataSource.java
@@ -50,7 +50,7 @@ public class DataSource {
if (mContentUri != null) {
if (mContentUri.getScheme().equals("file")) {
// get the rest after "file://"
- String path = mContentUri.toString().substring(6);
+ String path = Uri.decode(mContentUri.toString().substring(7));
if (path.startsWith(Environment.getExternalStorageDirectory().getAbsolutePath())) {
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
throw new GeneralException(context.getString(R.string.error_externalStorageNotReady));