Actually act according to the user's answer in the 'attach to every mail' question
authorweasel <weasel@b513b33f-fedd-0310-b452-c3deb5f4c849>
Sat, 3 Jul 2004 12:33:13 +0000 (12:33 +0000)
committerweasel <weasel@b513b33f-fedd-0310-b452-c3deb5f4c849>
Sat, 3 Jul 2004 12:33:13 +0000 (12:33 +0000)
Fix sanitize_uid

git-svn-id: svn://svn.debian.org/pgp-tools/trunk@16 b513b33f-fedd-0310-b452-c3deb5f4c849

caff/caff

index cb482518f273346dc56a1d606a0f4f53ab6e3045..a4ed5983cca2360814dbd4994cca88d5aa168d60 100755 (executable)
--- 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;
                        };
                };