]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Added unlink to remove the uncompressed log
authorJari Matilainen <redacted>
Sat, 7 Jan 2017 11:40:40 +0000 (11:40 +0000)
committerJari Matilainen <redacted>
Sat, 7 Jan 2017 11:40:40 +0000 (11:40 +0000)
scripts/logcompress_perl.pl

index 062331eb412f3ea6caa41b9616d077dc59ed1541..37395b5087c963efb3aa07a7dbd5c4b594f7aca5 100644 (file)
@@ -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');
git clone https://git.99rst.org/PROJECT