]> git.donarmstrong.com Git - infobot.git/blobdiff - scripts/irclog2html.pl
don't die if can't create file
[infobot.git] / 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;