From b4779307a2dc65a12c17205dbbc7e43efc2b99f7 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 10 Oct 2019 11:38:25 +1000 Subject: [PATCH] MDL-52189 file: skip deleting temp files that appear during cleanup --- lib/classes/task/file_temp_cleanup_task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/task/file_temp_cleanup_task.php b/lib/classes/task/file_temp_cleanup_task.php index ac3359cda16..05bfd5cccbd 100644 --- a/lib/classes/task/file_temp_cleanup_task.php +++ b/lib/classes/task/file_temp_cleanup_task.php @@ -68,7 +68,7 @@ class file_temp_cleanup_task extends scheduled_task { // Now loop through again and remove old files and directories. for ($iter->rewind(); $iter->valid(); $iter->next()) { $node = $iter->getRealPath(); - if (!is_readable($node)) { + if (!isset($modifieddateobject[$node]) || !is_readable($node)) { continue; }