mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-48605 unit_test: Fixed file_temp_cleanup_task
touch should only work on temp and below dir's. With path we get temp/.. and temp/. So we were modfying moodledata dir as well and it was failing because of permission issues.
This commit is contained in:
parent
b51ff393cd
commit
d421a973d1
@ -88,8 +88,10 @@ class file_temp_cleanup_task extends scheduled_task {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Return the time modified to the original date.
|
||||
touch($node, $modifieddateobject[$node]);
|
||||
// Return the time modified to the original date only for real files.
|
||||
if ($iter->isDir() && !$iter->isDot()) {
|
||||
touch($node, $modifieddateobject[$node]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user