mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-65471 core: Sort directories before hashing
This commit is contained in:
parent
eb1b172397
commit
31f82832b6
1 changed files with 3 additions and 0 deletions
|
@ -1254,6 +1254,9 @@ $cache = '.var_export($cache, true).';
|
||||||
}
|
}
|
||||||
|
|
||||||
$scan = scandir($directory);
|
$scan = scandir($directory);
|
||||||
|
if ($scan) {
|
||||||
|
sort($scan);
|
||||||
|
}
|
||||||
$scanhashes = [];
|
$scanhashes = [];
|
||||||
foreach ($scan as $file) {
|
foreach ($scan as $file) {
|
||||||
$file = $directory . '/' . $file;
|
$file = $directory . '/' . $file;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue