No need for < at the start if reading from a command https://github.com/webmin/webmin/issues/1327

This commit is contained in:
Jamie Cameron
2020-12-30 12:22:24 -08:00
parent b3302eba26
commit 97c0c60b8c

View File

@ -65,14 +65,14 @@ sub get_config
{
local $file = $_[0] || $ipfw_file;
local $fmt = &get_ipfw_format();
if ($_[0] =~ /\|$/) {
if ($file =~ /\|$/) {
# When getting from command, there is never an 'add'
$fmt = 0;
}
local @rv;
local $cmt;
local $lnum = -1;
open(LIST, "<".$file);
open(LIST, $file =~ /\|$/ ? $file : "<".$file);
while(<LIST>) {
${$_[1]} .= $_ if ($_[1]);
$lnum++;