Преглед изворни кода

Update Logfile.pm

Added .xz extension support, thanks to Unit 193.
Xenthys пре 10 година
родитељ
комит
631ea2e43c
1 измењених фајлова са 3 додато и 0 уклоњено
  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");