emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb fb4d5d5 255/350: Migration should guard against un


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb fb4d5d5 255/350: Migration should guard against unparseable emails
Date: Mon, 14 Aug 2017 11:46:48 -0400 (EDT)

branch: externals/ebdb
commit fb4d5d5d861c45c7f1e5f79dfdeb23f669670c9d
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Migration should guard against unparseable emails
    
    * ebdb-migrate.el (ebdb-migrate-vector-to-class): Make sure we
      actually found an email address in there.
---
 ebdb-migrate.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ebdb-migrate.el b/ebdb-migrate.el
index 39a48de..c2f3769 100644
--- a/ebdb-migrate.el
+++ b/ebdb-migrate.el
@@ -502,11 +502,13 @@ holding valid contacts in a previous BBDB format."
     (when mail
       (dolist (m mail)
        (let ((bits (ebdb-decompose-ebdb-address m)))
-         (push (make-instance ebdb-default-mail-class
-                              :aka (car bits)
-                              :mail (cadr bits))
-               mails)))
-      (oset (car (last mails)) priority 'primary))
+         (when (cadr bits)
+           (push (make-instance ebdb-default-mail-class
+                                :aka (car bits)
+                                :mail (cadr bits))
+                 mails))))
+      (when mails
+       (oset (car (last mails)) priority 'primary)))
     (when xfields
       (dolist (x xfields)
        (setq lab (car x)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]