Merge pull request #1837 from mfietz/issue/1502-opml-import

OPML Import: Fix URI containing absolute path
This commit is contained in:
Tom Hennen 2016-04-01 19:35:40 -04:00
commit 3a1291865e
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,9 @@ public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Uri uri = getIntent().getData();
if(uri.toString().startsWith("/")) {
uri = Uri.parse("file://" + uri.toString());
}
importUri(uri);
}

View File

@ -135,6 +135,9 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == CHOOSE_OPML_FILE) {
Uri uri = data.getData();
if(uri.toString().startsWith("/")) {
uri = Uri.parse("file://" + uri.toString());
}
importUri(uri);
}
}