Skip to content

Commit

Permalink
Scripts: Remove -rf option in rm command to avoid going too far on er…
Browse files Browse the repository at this point in the history
…rors - refs BT#19673
  • Loading branch information
ywarnier committed Mar 22, 2022
1 parent 33e1e02 commit 6cf394f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/scripts/delete_old_message_attachments.php
Expand Up @@ -78,7 +78,7 @@
//echo " File found".PHP_EOL;
$totalSize += filesize($userBasePath.$filePath);
if ($simulate == false) {
exec('rm -rf '.$userBasePath.$filePath);
exec('rm '.$userBasePath.$filePath);
$res = Database::query($sqlDeleteAttach.$message['maid']);
} else {
echo "Would delete ".$userBasePath.$filePath.PHP_EOL;
Expand All @@ -94,7 +94,7 @@
//echo " File found in receiver's path".PHP_EOL;
$totalSize += filesize($userBasePath.$filePath);
if ($simulate == false) {
exec('rm -rf '.$userBasePath.$filePath);
exec('rm '.$userBasePath.$filePath);
$res = Database::query($sqlDeleteAttach.$message['maid']);
} else {
echo "Would delete ".$userBasePath.$filePath.PHP_EOL;
Expand Down

0 comments on commit 6cf394f

Please sign in to comment.