Skip to content

Commit

Permalink
Merge pull request #20599 from nextcloud/getDirectoryContent-filter-b…
Browse files Browse the repository at this point in the history
…lacklisted

filter out blacklisted files in getDirectoryContent
  • Loading branch information
icewind1991 authored Apr 23, 2020
2 parents 3c2dd08 + 7a4ea4a commit 7c6e77a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion apps/files_sharing/lib/Controller/ShareesAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\Share\IShare;
use OCP\Share;
use OCP\Share\IManager;
use function usort;

Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ public function getDirectoryContent($directory): \Traversable {
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);
}
Expand Down

0 comments on commit 7c6e77a

Please sign in to comment.