[Pgp-tools-commit] r336 - trunk/caff
weasel at alioth.debian.org
weasel at alioth.debian.org
Tue Jul 3 14:04:19 UTC 2007
Author: weasel
Date: 2007-07-03 14:04:19 +0000 (Tue, 03 Jul 2007)
New Revision: 336
Modified:
trunk/caff/caff
Log:
Fix typo, fix next/return/undefined bug with send_mail
Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff 2007-07-03 13:53:50 UTC (rev 335)
+++ trunk/caff/caff 2007-07-03 14:04:19 UTC (rev 336)
@@ -780,7 +780,7 @@
my $reason = $1;
my $keyid = $2;
if (grep { %_ eq $keyid } @{$CONFIG{'also-encrypt-to'}}) {
- warn("Could not encrypt to $keyid, spezified in CONFIG{'also-encrypt-to'}. Try to update the key using gpg --homedir=\$HOME/caff/gnupghome --import <keyd>.");
+ warn("Could not encrypt to $keyid, specified in CONFIG{'also-encrypt-to'}. Try to update the key using gpg --homedir=\$HOME/caff/gnupghome --import <exported key>.");
return;
};
};
@@ -1315,12 +1315,15 @@
$address =~ s/.*<(.*)>.*/$1/;
if (ask("Mail signature for $uid->{'text'} to '$address'?", 1, $CONFIG{'mail'})) {
my $mail = send_mail($address, $can_encrypt, $longkeyid, $uid, @attached);
-
- my $keydir = "$KEYSBASE/$DATE_STRING";
- my $mailfile = "$keydir/$longkeyid.mail.".$uid->{'serial'}.".".sanitize_uid($uid->{'text'});
- open (KEY, ">$mailfile") or die ("Cannot open $mailfile: $!\n");
- print KEY $mail;
- close KEY;
+ if (defined $mail) {
+ my $keydir = "$KEYSBASE/$DATE_STRING";
+ my $mailfile = "$keydir/$longkeyid.mail.".$uid->{'serial'}.".".sanitize_uid($uid->{'text'});
+ open (KEY, ">$mailfile") or die ("Cannot open $mailfile: $!\n");
+ print KEY $mail;
+ close KEY;
+ } else {
+ warn "Generating mail failed.\n";
+ };
};
};
};
More information about the Pgp-tools-commit
mailing list