summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2018-02-20 13:15:30 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2018-02-20 13:15:30 (GMT)
commit2c494255a3bf9ac3fda8c5d85e840d6b9c902d00 (patch) (side-by-side diff)
treed6b03cfa4eb5cdb1c4cbdb1c8caf5944b1ab1093
parentad5361f9a7992302e9a1821fa36bbd5f60df15ec (diff)
downloadacpp-2c494255a3bf9ac3fda8c5d85e840d6b9c902d00.tar.gz
acpp-2c494255a3bf9ac3fda8c5d85e840d6b9c902d00.tar.bz2
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.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--lib/Apache/Config/Preproc/include.pm1
1 files changed, 1 insertions, 0 deletions
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) {

Return to:

Send suggestions and report system problems to the System administrator.