Fixed.
authorueno <ueno>
Sun, 12 Nov 2006 02:51:13 +0000 (02:51 +0000)
committerueno <ueno>
Sun, 12 Nov 2006 02:51:13 +0000 (02:51 +0000)
epa.el
epg.el

diff --git a/epa.el b/epa.el
index 1506f28..63767ff 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -820,8 +820,12 @@ Don't use this command in Lisp programs!"
   (interactive "fFile: ")
   (let ((context (epg-make-context)))
     (message "Importing %s..." (file-name-nondirectory file))
-    (epg-import-keys-from-file context (expand-file-name file))
-    (message "Importing %s...done" (file-name-nondirectory file))
+    (condition-case nil
+       (progn
+         (epg-import-keys-from-file context (expand-file-name file))
+         (message "Importing %s...done" (file-name-nondirectory file)))
+      (error
+       (message "Importing %s...failed" (file-name-nondirectory file))))
     (if (epg-context-result-for context 'import)
        (epa-display-info (epg-import-result-to-string
                           (epg-context-result-for context 'import))))))
diff --git a/epg.el b/epg.el
index 0f0e02b..18d3991 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -1570,22 +1570,20 @@ This function is for internal use only."
 \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\)" string)
     (epg-context-set-result-for
      context 'import
-     (cons (epg-make-import-result
-           (string-to-number (match-string 1 string))
-           (string-to-number (match-string 2 string))
-           (string-to-number (match-string 3 string))
-           (string-to-number (match-string 4 string))
-           (string-to-number (match-string 5 string))
-           (string-to-number (match-string 6 string))
-           (string-to-number (match-string 7 string))
-           (string-to-number (match-string 8 string))
-           (string-to-number (match-string 9 string))
-           (string-to-number (match-string 10 string))
-           (string-to-number (match-string 11 string))
-           (string-to-number (match-string 12 string))
-           (string-to-number (match-string 13 string))
-           (epg-context-result-for context 'import-status))
-          (epg-context-result-for context 'import)))
+     (epg-make-import-result (string-to-number (match-string 1 string))
+                            (string-to-number (match-string 2 string))
+                            (string-to-number (match-string 3 string))
+                            (string-to-number (match-string 4 string))
+                            (string-to-number (match-string 5 string))
+                            (string-to-number (match-string 6 string))
+                            (string-to-number (match-string 7 string))
+                            (string-to-number (match-string 8 string))
+                            (string-to-number (match-string 9 string))
+                            (string-to-number (match-string 10 string))
+                            (string-to-number (match-string 11 string))
+                            (string-to-number (match-string 12 string))
+                            (string-to-number (match-string 13 string))
+                            (epg-context-result-for context 'import-status)))
     (epg-context-set-result-for context 'import-status nil)))
 
 (defun epg-passphrase-callback-function (context key-id handback)