mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 03:31:24 +02:00
Handle trailing whitespace in Shorewall::Config::read_a_line1()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
1477d60926
commit
79b5c38ecb
@ -2269,8 +2269,9 @@ sub read_a_line1() {
|
|||||||
while ( $currentline = <$currentfile> ) {
|
while ( $currentline = <$currentfile> ) {
|
||||||
next if $currentline =~ /^\s*#/;
|
next if $currentline =~ /^\s*#/;
|
||||||
chomp $currentline;
|
chomp $currentline;
|
||||||
next if $currentline =~ /^\s*$/;
|
|
||||||
$currentline =~ s/#.*$//; # Remove Trailing Comments
|
$currentline =~ s/#.*$//; # Remove Trailing Comments
|
||||||
|
$currentline =~ s/\s*$//; # Remove Trailing Whitespace
|
||||||
|
next if $currentline =~ /^\s*$/;
|
||||||
fatal_error "Non-ASCII gunk in file" if $currentline =~ /[^\s[:print:]]/;
|
fatal_error "Non-ASCII gunk in file" if $currentline =~ /[^\s[:print:]]/;
|
||||||
$currentlinenumber = $.;
|
$currentlinenumber = $.;
|
||||||
print "IN===> $currentline\n" if $debug;
|
print "IN===> $currentline\n" if $debug;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user