From: weasel Date: Sat, 3 Jul 2004 12:33:13 +0000 (+0000) Subject: Actually act according to the user's answer in the 'attach to every mail' question X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=3b1316734ed5afd5e0b9350c19ded252a732a467;p=pgp-tools.git Actually act according to the user's answer in the 'attach to every mail' question Fix sanitize_uid git-svn-id: svn://svn.debian.org/pgp-tools/trunk@16 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/caff/caff b/caff/caff index cb48251..a4ed598 100755 --- a/caff/caff +++ b/caff/caff @@ -446,7 +446,8 @@ $CONFIG{'owner'} sub sanitize_uid($) { my ($uid) = @_; - my $good_uid =~ tr#/:\\#_#; + my $good_uid = $uid; + $good_uid =~ tr#/:\\#_#; trace2("[sanitize_uid] changed UID from $uid to $good_uid.\n") if $good_uid ne $uid; return $good_uid; }; @@ -713,7 +714,7 @@ for my $keyid (@keyids_ok) { trace("UID: $uid->{'text'}\n"); unless ($uid->{'text'} =~ /@/) { my $attach = ask("UID $uid->{'text'} is no email address, attach it to every email sent?", 1); - push @attached, $uid; + push @attached, $uid if $attach; }; };