This commit is contained in:
Stefan Rohde-Enslin 2020-11-11 17:27:33 +01:00
commit d7c89275e7

View File

@ -63,7 +63,13 @@ final class MD_STD {
throw new MDFileDoesNotExist("There is no file {$filepath}");
}
return \array_values(\array_diff($output, ['.', '..', '.git']));
// Remove unwanted files from list
$output = \array_diff($output, ['.', '..', '.git']);
// Return array values, to make it a list rather than an associative array.
// This should be done in a separate line, as it observably leads to a
// significant reduction in the used RAM.
return \array_values($output);
}