Don't apply the deprecated directory more than once

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2020-07-06 15:38:28 -07:00
parent cd5409d633
commit 4469ddb861
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -5380,13 +5380,6 @@ sub ensure_config_path() {
shift @config_path if $chop && ( $export || $> != 0 );
#
# To accomodate Cygwin-based compilation, we have separate directories for files whose names
# clash on a case-insensitive filesystem.
#
push @config_path, $globals{SHAREDIR} . "/deprecated";
push @config_path, $shorewallrc{SHAREDIR}. '/shorewall/deprecated' unless $globals{PRODUCT} eq 'shorewall';
for ( @config_path ) {
$_ .= '/' unless m|/$|;
s|//|/|g;
@ -6321,6 +6314,14 @@ sub get_configuration( $$$ ) {
process_shorewall_conf( $update, $annotate );
ensure_config_path;
#
# To accomodate Cygwin-based compilation, we have separate directories for files whose names
# clash on a case-insensitive filesystem.
#
push @config_path, $globals{SHAREDIR} . "/deprecated/" unless $config_path[-1] eq $globals{SHAREDIR} . "/deprecated/";
push @config_path, $shorewallrc{SHAREDIR}. '/shorewall/deprecated/' unless $globals{PRODUCT} eq 'shorewall';
$config{CONFIG_PATH} = join( ':', @config_path );
@INC = @originalinc;