]> git.sthu.org Git - pgp-tools.git/commitdiff
Print error reason when we die
authorweasel <weasel@b513b33f-fedd-0310-b452-c3deb5f4c849>
Tue, 28 Jun 2005 18:11:13 +0000 (18:11 +0000)
committerweasel <weasel@b513b33f-fedd-0310-b452-c3deb5f4c849>
Tue, 28 Jun 2005 18:11:13 +0000 (18:11 +0000)
git-svn-id: svn://svn.debian.org/pgp-tools/trunk@91 b513b33f-fedd-0310-b452-c3deb5f4c849

caff/caff

index ec6b6f409efc84d646b593e60d48be9059b7bd82..009b0b5683d3234b6fece6512956d5eb6ab8e432 100755 (executable)
--- a/caff/caff
+++ b/caff/caff
@@ -814,7 +814,7 @@ for my $keyid (@keyids_ok) {
                        -d $keydir  || mkpath($keydir , 0, 0700) or die ("Cannot create $keydir $!\n");
 
                        my $keyfile = "$keydir/$longkeyid.key.$uid_number.".sanitize_uid($this_uid_text).".asc";
-                       open (KEY, ">$keyfile") or die ("Cannot open $keyfile\n");
+                       open (KEY, ">$keyfile") or die ("Cannot open $keyfile: $!\n");
                        print KEY $asciikey;
                        close KEY;
 
@@ -850,7 +850,7 @@ for my $keyid (@keyids_ok) {
 
                                        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");
+                                       open (KEY, ">$mailfile") or die ("Cannot open $mailfile: $!\n");
                                        print KEY $mail;
                                        close KEY;
                                };