From 4469ddb861f14e33bcbf993d07487e1f938cf483 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 6 Jul 2020 15:38:28 -0700 Subject: [PATCH] Don't apply the deprecated directory more than once Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 0a8905cfb..8431b0ec3 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -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;