MDL-52189 file: skip deleting temp files that appear during cleanup

This commit is contained in:
Colin Campbell
2020-01-22 12:09:50 +10:00
committed by Jonathon Fowler
parent 36984d4d1d
commit b4779307a2
+1 -1
View File
@@ -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;
}