Put swap file File::find into an eval because it can die.

pull/4095/head
Isaac Connor 2024-07-16 10:11:52 -04:00
parent 8c6396a659
commit 4c9f6d3091
1 changed files with 5 additions and 3 deletions

View File

@ -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} ) {