Skip to content

Commit a08a291

Browse files
committed
BUG - Cleanup website tmp directories (#5434)
1 parent 2d03b45 commit a08a291

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/classes/cron.d/200-logfiles.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function onRunJob() {
217217
foreach($records as $rec){
218218
$tmp_path = realpath($rec['document_root'].'/tmp');
219219
if($tmp_path != '' && strlen($tmp_path) > 10 && is_dir($tmp_path) && $app->system->is_user($rec['system_user'])){
220-
exec("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
220+
$app->system->exec_safe("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
221221
}
222222
}
223223
}

0 commit comments

Comments
 (0)