fixed to use closedir() instead close() when closing directories

This commit is contained in:
Jordi Sanfeliu 2014-06-02 17:26:27 +02:00
parent 1cb217a92a
commit 02eb4fb837
2 changed files with 2 additions and 2 deletions

View File

@ -480,7 +480,7 @@ if($options{d}) {
# load additional configuration files
if($config{include_dir} && opendir(DIR, $config{include_dir})) {
my @files = grep { !/^[.]/ } readdir(DIR);
close(DIR);
closedir(DIR);
foreach my $c (sort @files) {
next unless -f $config{include_dir} . "/$c";
next unless $c =~ m/\.conf$/;

View File

@ -219,7 +219,7 @@ my $conf = new Config::General(
# load additional configuration files
if($config{include_dir} && opendir(DIR, $config{include_dir})) {
my @files = grep { !/^[.]/ } readdir(DIR);
close(DIR);
closedir(DIR);
foreach my $c (sort @files) {
next unless -f $config{include_dir} . "/$c";
next unless $c =~ m/\.conf$/;