From 8d8309c137e84e94cf99fc8f8241e4fcf3045c80 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Thu, 18 Feb 2016 10:45:21 +0100 Subject: [PATCH] Only try to re-read IgnoreFile on reload if one is configured. Only try to read-in the IgnoreFile when calling an reload, if one has been specified. Signed-off-by: Stefan Schantl --- guardian | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guardian b/guardian index 7b4c23f..c1bf4ca 100644 --- a/guardian +++ b/guardian @@ -387,8 +387,10 @@ sub Reload () { # Update logger object in mainsettings hash. $mainsettings{Logger} = $logger; - # Update ignore list. - &Guardian::Events::GenerateIgnoreList($mainsettings{IgnoreFile}); + # Update ignore list, if one has been specified. + if (exists($mainsettings{IgnoreFile})) { + &Guardian::Events::GenerateIgnoreList($mainsettings{IgnoreFile}); + } # Re-generate hash of monitored files. %monitored_files = &Guardian::Base::GenerateMonitoredFiles(\%mainsettings, \%monitored_files); -- 2.39.5