summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/logcompress_perl.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/logcompress_perl.pl b/scripts/logcompress_perl.pl
index 062331e..37395b5 100644
--- a/scripts/logcompress_perl.pl
+++ b/scripts/logcompress_perl.pl
@@ -18,6 +18,7 @@ $VERSION = "0.01";
sub sig_rotate {
my $input = $_[0]->{real_fname};
gzip $input => "$input.gz" or Irssi::print(MSGLEVEL_CLIENTERROR, "gzip failed: $GzipError\n");
+ unlink $input if -e "$input.gz";
}
Irssi::signal_add('log rotated', 'sig_rotate');