diff options
Diffstat (limited to 'lib/private/Files/Storage/Wrapper/PermissionsMask.php')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/PermissionsMask.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Wrapper/PermissionsMask.php b/lib/private/Files/Storage/Wrapper/PermissionsMask.php index c2cea31bd5a..6b453b4380a 100644 --- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php +++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php @@ -157,4 +157,13 @@ class PermissionsMask extends Wrapper { } return parent::getScanner($path, $storage); } + + public function getDirectoryContent($directory): \Traversable { + foreach ($this->getWrapperStorage()->getDirectoryContent($directory) as $data) { + $data['scan_permissions'] = isset($data['scan_permissions']) ? $data['scan_permissions'] : $data['permissions']; + $data['permissions'] &= $this->mask; + + yield $data; + } + } } |