Don't run output through tac if there is no output https://github.com/webmin/webmin/issues/912

This commit is contained in:
Jamie Cameron
2018-04-29 10:41:08 -07:00
parent 0eb45125c8
commit 9079be4b0d

View File

@@ -144,7 +144,7 @@ elsif ($in{'view'}) {
# Just run tail on the file
$fullcmd = $tailcmd." ".quotemeta($file);
}
if ($config{'reverse'}) {
if ($config{'reverse'} && $fullcmd) {
$fullcmd .= " | tac";
}
if ($fullcmd) {