henrycatalinismith / ppl

The command line address book
http://henry.catalinismith.com/ppl/
Other
300 stars 18 forks source link

Email addresses being saved twice #13

Closed henrycatalinismith closed 11 years ago

henrycatalinismith commented 11 years ago

Just a note that an issue has been found and fixed where email addresses were saved twice by the ppl email command. For example, the following steps would lead to the address "arnold@example.org" appearing twice in the list of email addresses for the contact "arnold":

$ ppl init ~/contacts
$ cd ~/contacts
$ ppl add arnold "Arnold Example User"
$ ppl email arnold arnold@example.org
$ ppl email arnold
arnold@example.org
arnold@example.org

This bug was due to an accidental repeated call to encode_email_addresses in Ppl::Adapter::Vcard::Vpim#encode. The bug has been fixed in version 1.6.0, so upgrade to that version if you're affected and want to fix it.

If you want to clean up your data, I've also allowed the ppl email --delete action to jump the queue of other features and implemented it already. So as of 1.6.0, if you want to fix duplicate contact addresses for contacts such as our example arnold above, do the following:

$ ppl email arnold --delete arnold@example.org
$ ppl email arnold arnold@example.org

That's all!