]> git.donarmstrong.com Git - infobot.git/commitdiff
don't die if can't create file
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 24 Jan 2006 21:57:57 +0000 (21:57 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 24 Jan 2006 21:57:57 +0000 (21:57 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1269 c11ca15a-4712-0410-83d8-924469b57eb5

scripts/irclog2html.pl

index 6ae27e5e6c90d9ce99ea9a0b6ef402b1566d2726..9cef0188cd11fd1b5844effc49035cbb15a5e963 100755 (executable)
@@ -107,7 +107,8 @@ sub add_footers {
        foreach $filename (@files) {
                chomp $filename;
                if (!open(OUTPUT, ">>$filename")) {
-                       die "Cannot open $filename for writing!\n\n";
+                       print "Cannot open $filename for writing!\n\n";
+                       return;
                }
                print OUTPUT footer();
                close OUTPUT;
@@ -126,7 +127,8 @@ sub output_line {
 
        mkdir($channel,oct('755')) if ($channel && ! -d $channel);
        if (!open(OUTPUT, ">>$filename")) {
-               die "Cannot open $filename for writing!\n\n";
+               #print "Cannot open $filename for writing!\n\n";
+               return;
        }
        # Begin output #
   print OUTPUT header($channel, $date) if -z $filename;