(mml2015-pgg-decrypt): Only add security information
authorSimon Josefsson <jas@extundo.com>
Thu, 26 Sep 2002 17:03:40 +0000 (17:03 +0000)
committerSimon Josefsson <jas@extundo.com>
Thu, 26 Sep 2002 17:03:40 +0000 (17:03 +0000)
if dissecting resulting buffer actually had any information.

lisp/ChangeLog
lisp/mml2015.el

index a704ef7..59b9a20 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-26  Simon Josefsson  <jas@extundo.com>
+
+       * mml2015.el (mml2015-pgg-decrypt): Only add security information
+       if dissecting resulting buffer actually had any information.
+
 2002-09-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-group.el (gnus-group-sort-by-method): Remove `symbol-name'
index dc304d4..1b63497 100644 (file)
@@ -662,8 +662,9 @@ by you.")
        (if (condition-case err
                (prog1
                    (pgg-decrypt-region (point-min) (point-max))
-                 (setq decrypt-status (with-current-buffer mml2015-result-buffer
-                                        (buffer-string))))
+                 (setq decrypt-status 
+                       (with-current-buffer mml2015-result-buffer
+                         (buffer-string))))
              (error
               (mm-set-handle-multipart-parameter
                mm-security-handle 'gnus-details (mml2015-format-error err))
@@ -679,7 +680,10 @@ by you.")
               mm-security-handle 'gnus-info "OK")
              (mm-set-handle-multipart-parameter
               mm-security-handle 'gnus-details
-              (concat decrypt-status "\n" (mm-handle-multipart-ctl-parameter handles 'gnus-details)))
+              (concat decrypt-status
+                      (when (stringp (car handles))
+                        "\n" (mm-handle-multipart-ctl-parameter
+                              handles 'gnus-details))))
              (if (listp (car handles))
                  handles
                (list handles)))