From 02eb4fb837bcab39e52a3a7e267dcab71ec8886e Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Mon, 2 Jun 2014 17:26:27 +0200 Subject: [PATCH] fixed to use closedir() instead close() when closing directories --- monitorix | 2 +- monitorix.cgi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitorix b/monitorix index 419cf24..c467ad8 100755 --- a/monitorix +++ b/monitorix @@ -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$/; diff --git a/monitorix.cgi b/monitorix.cgi index 9e2bdda..0fc5c24 100755 --- a/monitorix.cgi +++ b/monitorix.cgi @@ -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$/;