Add test for empty storage path

This commit is contained in:
Isaac Connor 2015-12-21 15:29:18 -05:00
parent 3e29aa56a3
commit 9d454bdc41
1 changed files with 5 additions and 0 deletions

View File

@ -313,6 +313,11 @@ sub delete_files {
my $Storage = new ZoneMinder::Storage( $_[0]{StorageId} );
my $storage_path = $Storage->Path();
if ( ! $storage_path ) {
Fatal("No storage path when deleting fileds for event $_[0]{Id} with storage id $_[0]{StorageId} ");
return;
}
chdir ( $storage_path );
if ( $Config{ZM_USE_DEEP_STORAGE} )