Merge pull request #1837 from mfietz/issue/1502-opml-import
OPML Import: Fix URI containing absolute path
This commit is contained in:
commit
3a1291865e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue