* epg.el (epg-start-import-keys): Don't specify filename if keys
authorueno <ueno>
Sun, 28 May 2006 06:51:05 +0000 (06:51 +0000)
committerueno <ueno>
Sun, 28 May 2006 06:51:05 +0000 (06:51 +0000)
is a string data.

ChangeLog
epg.el

index ca8213b..6b4f505 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-28  Daiki Ueno  <ueno@unixuser.org>
+
+       * epg.el (epg-start-import-keys): Don't specify filename if keys
+       is a string data.
+
 2006-05-27  Daiki Ueno  <ueno@unixuser.org>
 
        * epg.el (epg--process-filter): Pass epg-context instead of
diff --git a/epg.el b/epg.el
index 4604269..b738e8f 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -1898,7 +1898,9 @@ If you are unsure, use synchronous version of this function
 `epg-import-keys-from-file' or `epg-import-keys-from-string' instead."
   (epg-context-set-operation context 'import-keys)
   (epg-context-set-result context nil)
-  (epg--start context (list "--import" (epg-data-file keys)))
+  (epg--start context (if (epg-data-file keys)
+                         (list "--import" (epg-data-file keys))
+                       (list "--import")))
   (when (epg-data-string keys)
     (if (eq (process-status (epg-context-process context)) 'run)
        (process-send-string (epg-context-process context)