Merge pull request #20599 from nextcloud/getDirectoryContent-filter-blacklisted

filter out blacklisted files in getDirectoryContent
This commit is contained in:
Robin Appelman 2020-04-23 14:08:47 +00:00 committed by GitHub
commit 7c6e77a7fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -48,7 +48,6 @@ use OCP\IConfig;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\Share\IShare;
use OCP\Share;
use OCP\Share\IManager;
use function usort;

View File

@ -874,7 +874,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
if (is_resource($dh)) {
$basePath = rtrim($directory, '/');
while (($file = readdir($dh)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
if (!Filesystem::isIgnoredDir($file) && !Filesystem::isFileBlacklisted($file)) {
$childPath = $basePath . '/' . trim($file, '/');
yield $this->getMetaData($childPath);
}