Set Scheme when Shallow. Improve debug message. Fix spacing

This commit is contained in:
Isaac Connor 2018-11-23 12:16:11 -05:00
parent 73d27f5095
commit 6d19280069
1 changed files with 9 additions and 8 deletions

View File

@ -413,7 +413,7 @@ MAIN: while( $loop ) {
Error("Can't chdir directory '$$Storage{Path}/$monitor_dir': $!");
next;
}
if ( ! opendir( DIR, "." ) ) {
if ( ! opendir(DIR, '.') ) {
Error("Can't open directory '$$Storage{Path}/$monitor_dir': $!");
next;
}
@ -424,6 +424,7 @@ MAIN: while( $loop ) {
my $Event = $fs_events->{$event} = new ZoneMinder::Event();
$$Event{Id} = $event;
#$$Event{Path} = $event_path;
$$Event{Scheme} = 'Shallow';
$Event->MonitorId( $monitor_dir );
$Event->StorageId( $Storage->Id() );
} # end foreach event
@ -580,7 +581,7 @@ MAIN: while( $loop ) {
}
} # end if exists in filesystem
} else {
Debug("Found fs event for $db_event, $age at " . $$fs_events{$db_event}->Path());
Debug("Found fs event for id $db_event, $age seconds old at " . $$fs_events{$db_event}->Path());
my $Event = new ZoneMinder::Event( $db_event );
if ( ! $Event->check_for_in_filesystem() ) {
Warning("Not found at " . $Event->Path() . ' was found at ' . $$fs_events{$db_event}->Path() );