Merge pull request #1201 from ZoneMinder/fix_zmaudit_monitors_starting_with_a_digit

Skip directories that have non-digits in them
This commit is contained in:
Andrew Bauer 2015-12-31 07:15:33 -06:00
commit 0c872c292f
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,8 @@ MAIN: while( $loop ) {
my $fs_monitors;
foreach my $monitor ( glob("[0-9]*") )
{
# Thie glob above gives all files starting with a digit. So a monitor with a name starting with a digit will be in this list.
next if $monitor =~ /\D/;
Debug( "Found filesystem monitor '$monitor'" );
my $fs_events = $fs_monitors->{$monitor} = {};
( my $monitor_dir ) = ( $monitor =~ /^(.*)$/ ); # De-taint