From ec3cef978e98ded9cfcdd4c2aad5b2531db1be3d Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 5 Sep 2007 14:13:13 +0000 Subject: [PATCH] Fixed issue with flat event file dirs not being detected. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2192 e3e1d417-86f3-4887-817a-d78f3d33393f --- scripts/zmaudit.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/zmaudit.pl b/scripts/zmaudit.pl index c31c74a91..17b4e3212 100644 --- a/scripts/zmaudit.pl +++ b/scripts/zmaudit.pl @@ -218,10 +218,10 @@ do } else { - opendir( DIR, $monitor_dir ) or Fatal( "Can't open directory '$monitor_dir': $!" ); - my @temp_events = sort { $b <=> $a } grep { -l $_ } readdir( DIR ); - closedir( DIR ); chdir( $monitor_dir ); + opendir( DIR, "." ) or Fatal( "Can't open directory '$monitor_dir': $!" ); + my @temp_events = sort { $b <=> $a } grep { -d $_ && $_ =~ /^\d+$/ } readdir( DIR ); + closedir( DIR ); my $count = 0; foreach my $event ( @temp_events ) { @@ -234,8 +234,8 @@ do $fs_events->{$event} = (time() - ($^T - ((-M $event) * 24*60*60))); } } + chdir( EVENT_PATH ); } - chdir( EVENT_PATH ); Debug( "Got ".int(keys(%$fs_events))." events\n" ); }