handle when reading the link returns nothing

This commit is contained in:
Isaac Connor 2018-01-29 21:16:41 -05:00
parent b9a98d34bf
commit 9f5c8078fc
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ MAIN: while( $loop ) {
#Event path is hour/minute/sec
my $event_path = readlink( $event_link );
if ( !-e $event_path ) {
if ( !($event_path and -e $event_path) ) {
aud_print( "Event link $day_dir/$event_link does not point to valid target" );
if ( confirm() ) {
( $event_link ) = ( $event_link =~ /^(.*)$/ ); # De-taint