aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/org/connectbot/PubkeyListActivity.java16
2 files changed, 11 insertions, 7 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8a658ad..2fe1fab 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.connectbot"
android:versionName="1.7-dev"
- android:versionCode="249">
+ android:versionCode="250">
<application
android:icon="@drawable/icon"
diff --git a/src/org/connectbot/PubkeyListActivity.java b/src/org/connectbot/PubkeyListActivity.java
index df21b7b..41422fe 100644
--- a/src/org/connectbot/PubkeyListActivity.java
+++ b/src/org/connectbot/PubkeyListActivity.java
@@ -494,12 +494,16 @@ public class PubkeyListActivity extends ListActivity implements EventListener {
case REQUEST_CODE_PICK_FILE:
if (resultCode == RESULT_OK && intent != null) {
Uri uri = intent.getData();
- if (uri != null) {
- readKeyFromFile(new File(URI.create(uri.toString())));
- } else {
- String filename = intent.getDataString();
- if (filename != null)
- readKeyFromFile(new File(URI.create(filename)));
+ try {
+ if (uri != null) {
+ readKeyFromFile(new File(URI.create(uri.toString())));
+ } else {
+ String filename = intent.getDataString();
+ if (filename != null)
+ readKeyFromFile(new File(URI.create(filename)));
+ }
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Couldn't read from picked file", e);
}
}
break;