From 2c494255a3bf9ac3fda8c5d85e840d6b9c902d00 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 20 Feb 2018 15:15:30 +0200 Subject: Correctly handle includes referring to a directory Previous versions were unable to expand statements like Include /some/dir where /some/dir is the name of an existing directory. This commit fixes that. * lib/Apache/Config/Preproc/include.pm (expand): Append '/*' if pattern is an existing directory. --- lib/Apache/Config/Preproc/include.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Apache/Config/Preproc/include.pm b/lib/Apache/Config/Preproc/include.pm index 7b3eebe..b4fd7b1 100644 --- a/lib/Apache/Config/Preproc/include.pm +++ b/lib/Apache/Config/Preproc/include.pm @@ -73,6 +73,7 @@ sub expand { } } + $pat = File::Spec->catfile($pat, '*') if -d $pat; my @filelist = glob $pat; if (@filelist) { foreach my $file (@filelist) { -- cgit v1.2.1