Skip to content

Commit

Permalink
Put swap file File::find into an eval because it can die.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jul 16, 2024
1 parent 8c6396a commit 4c9f6d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/zmaudit.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,11 @@ FROM `Frames` WHERE `EventId`=?';
unlink( split( /;/, $untainted_old_files ) );
}

# Now delete any old swap files
( my $swap_image_root ) = ( $Config{ZM_PATH_SWAP} =~ /^(.*)$/ ); # De-taint
File::Find::find( { wanted=>\&deleteSwapImage, untaint=>1 }, $swap_image_root );
eval {
# Now delete any old swap files
( my $swap_image_root ) = ( $Config{ZM_PATH_SWAP} =~ /^(.*)$/ ); # De-taint
File::Find::find( { wanted=>\&deleteSwapImage, untaint=>1 }, $swap_image_root );
};

# Prune the Logs table if required
if ( $Config{ZM_LOG_DATABASE_LIMIT} ) {
Expand Down

0 comments on commit 4c9f6d3

Please sign in to comment.