diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-01-07 21:10:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 21:10:53 +0100 |
commit | 171373a9442ee5af5b42b3989afbe2fa7ad99fbd (patch) | |
tree | f1e014fa69c65f85b79ffa8321bae276dedfafe7 | |
parent | 4f52e83695d848f44d9596a3b5b6f978faada2e3 (diff) | |
parent | 205386b24e0b16a8cce9db9b00e296fb813ffc7f (diff) | |
download | nextcloud-server-171373a9442ee5af5b42b3989afbe2fa7ad99fbd.tar.gz nextcloud-server-171373a9442ee5af5b42b3989afbe2fa7ad99fbd.zip |
Merge pull request #24989 from nextcloud/scanner-ignore-non-readable
ignore files that have no read permissions during scanning
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 1b9637ac61e..26264321a9a 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -415,6 +415,10 @@ class Scanner extends BasicEmitter implements IScanner { $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; |