Explorar o código

Update Logfile.pm

Added .xz extension support, thanks to Unit 193.
Xenthys %!s(int64=10) %!d(string=hai) anos
pai
achega
631ea2e43c
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      modules/Pisg/Parser/Logfile.pm

+ 3 - 0
modules/Pisg/Parser/Logfile.pm

@@ -292,6 +292,9 @@ sub _parse_file
     } elsif ($file =~ /.gz$/ && -f $file) {
         open (LOGFILE, "gunzip -c $file |") or
         die("$0: Unable to open logfile($file): $!\n");
+    } elsif ($file =~ /.xz$/ && -f $file) {
+        open (LOGFILE, "unxz -c $file |") or
+        die("$0: Unable to open logfile($file): $!\n");
     } else {
         open (LOGFILE, $file) or
         die("$0: Unable to open logfile($file): $!\n");