Skip to content

Commit

Permalink
Merge pull request #24989 from nextcloud/scanner-ignore-non-readable
Browse files Browse the repository at this point in the history
ignore files that have no read permissions during scanning
  • Loading branch information
MorrisJobke authored Jan 7, 2021
2 parents 4f52e83 + 205386b commit 171373a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/Files/Cache/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@ private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$s
$childQueue = [];
$newChildNames = [];
foreach ($newChildren as $fileMeta) {
$permissions = isset($fileMeta['scan_permissions']) ? $fileMeta['scan_permissions'] : $fileMeta['permissions'];
if ($permissions === 0) {
continue;
}
$file = $fileMeta['name'];
$newChildNames[] = $file;
$child = $path ? $path . '/' . $file : $file;
Expand Down

0 comments on commit 171373a

Please sign in to comment.