properly URI-decode file:// URIs, so the files can be found

Fixes issues 63
This commit is contained in:
Thialfihar
2010-08-17 12:50:42 +00:00
parent 6e9146c91a
commit 96162b6608
4 changed files with 4 additions and 4 deletions

View File

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