mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-23 06:48:24 -04:00
More output on errors, make them non-fatal
This commit is contained in:
1 parent
c3043c1487
commit
5ff53ebce0
1 file changed
+9
-3
@@ -197,14 +197,20 @@ MAIN: while( $loop ) {
|
||||
my $fs_events = $fs_monitors->{$monitor} = {};
|
||||
# De-taint
|
||||
( my $monitor_dir ) = ( $monitor =~ /^(.*)$/ );
|
||||
|
||||
|
||||
if ( $Config{ZM_USE_DEEP_STORAGE} ) {
|
||||
foreach my $day_dir ( glob("$monitor_dir/*/*/*") ) {
|
||||
Debug( "Checking $day_dir" );
|
||||
( $day_dir ) = ( $day_dir =~ /^(.*)$/ ); # De-taint
|
||||
chdir( $day_dir );
|
||||
opendir( DIR, "." )
|
||||
or Fatal( "Can't open directory '$day_dir': $!" );
|
||||
if ( ! chdir( $day_dir ) ) {
|
||||
Error( "Can't chdir to $$Storage{Path}/$monitor_dir/'$day_dir': $!" );
|
||||
next;
|
||||
}
|
||||
if ( ! opendir( DIR, "." ) ) {
|
||||
Error( "Can't open directory $$Storage{Path}/$monitor_dir/'$day_dir': $!" );
|
||||
next;
|
||||
}
|
||||
my @event_links = sort { $b <=> $a } grep { -l $_ } readdir( DIR );
|
||||
closedir( DIR );
|
||||
my $count = 0;
|
||||
|
||||
Reference in new issue
Block a user