From bc4ce4f0095d9642ed99e07026b1e277ce79ee70 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 22 Dec 2015 12:35:25 -0500 Subject: [PATCH] add Event require and document lgob behaviour and skip monitor dirs that have anything other than digits in them --- scripts/zmaudit.pl.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index 25dc62f70..48157c3c2 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -115,6 +115,7 @@ if ( ($report + $interactive + $continuous) > 1 ) my $dbh = zmDbConnect(); require ZoneMinder::Storage; +require ZoneMinder::Event; my $max_image_age = 6/24; # 6 hours my $max_swap_age = 24/24; # 24 hours @@ -183,8 +184,11 @@ MAIN: while( $loop ) { foreach my $Storage ( new ZoneMinder::Storage(), ZoneMinder::Storage->find( ) ) { chdir( $Storage->Path() ); + # Please note that this glob will take all files beginning with a digit. foreach my $monitor ( glob("[0-9]*") ) { + next if $monitor =~ /\D/; + Debug( "Found filesystem monitor '$monitor'" ); my $fs_events = $fs_monitors->{$monitor} = {}; ( my $monitor_dir ) = ( $monitor =~ /^(.*)$/ ); # De-taint