OPML Import: Fix URI containing absolute path
This commit is contained in:
parent
208749d4a4
commit
7f666c8cd5
|
@ -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