diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index d77646fff703..db2398ddb64e 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1486,7 +1486,7 @@ public function getDirectoryContent($directory, $mimetype_filter = '') { $data = $this->getCacheEntry($storage, $internalPath, $directory); - if (!$data instanceof ICacheEntry || !isset($data['fileid']) || !($data->getPermissions() && Constants::PERMISSION_READ)) { + if (!$data instanceof ICacheEntry || !isset($data['fileid']) || !($data->getPermissions() & Constants::PERMISSION_READ)) { return []; } @@ -1539,7 +1539,7 @@ public function getDirectoryContent($directory, $mimetype_filter = '') { $rootEntry = $subCache->get(''); } - if ($rootEntry && ($rootEntry->getPermissions() && Constants::PERMISSION_READ)) { + if ($rootEntry && ($rootEntry->getPermissions() & Constants::PERMISSION_READ)) { $relativePath = \trim(\substr($mountPoint, $dirLength), '/'); if ($pos = \strpos($relativePath, '/')) { //mountpoint inside subfolder add size to the correct folder