mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 14:20:31 +01:00
Handle xz compressed files https://sourceforge.net/p/webadmin/bugs/4970/
This commit is contained in:
@@ -96,7 +96,7 @@ elsif ($in{'view'}) {
|
||||
}
|
||||
$cat = "(".join(" ; ", @cats).")";
|
||||
$got = &proc::safe_process_exec(
|
||||
"$cat | grep -i $filter | $tailcmd",
|
||||
"$cat | grep -i -a $filter | $tailcmd",
|
||||
0, 0, STDOUT, undef, 1, 0, undef, 1);
|
||||
} else {
|
||||
# Not filtering .. so cat the most recent non-empty file
|
||||
|
||||
@@ -354,6 +354,9 @@ elsif ($l =~ /\.Z$/i) {
|
||||
elsif ($l =~ /\.bz2$/i) {
|
||||
return &has_command("bunzip2") ? "bunzip2 -c $q" : undef;
|
||||
}
|
||||
elsif ($l =~ /\.xz$/i) {
|
||||
return &has_command("xz") ? "xz -d -c $q" : undef;
|
||||
}
|
||||
else {
|
||||
return "cat $q";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user