Browse Source

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

filter out blacklisted files in getDirectoryContent
pull/19124/head
Robin Appelman 6 years ago
committed by GitHub
parent
commit
7c6e77a7fa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/files_sharing/lib/Controller/ShareesAPIController.php
  2. 2
      lib/private/Files/Storage/Common.php

1
apps/files_sharing/lib/Controller/ShareesAPIController.php

@ -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;

2
lib/private/Files/Storage/Common.php

@ -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);
}

Loading…
Cancel
Save