Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-04-06 16:46:38 +0300
committerRobin Appelman <robin@icewind.nl>2022-04-06 19:08:13 +0300
commit5e69f98c16b551327edec2788156b699ee1e38d5 (patch)
treefe77185f85b95d4a874886135fdc2b31277e2c28 /lib/private/Files/View.php
parentae7205f550d12d713b0b079eb0889c8f3bafb42b (diff)
sh
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index eef87cc65f4..30dc5518be8 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1449,21 +1449,21 @@ class View {
$cache = $storage->getCache($internalPath);
$user = \OC_User::getUser();
- if (!$directoryInfo) {
- $data = $this->getCacheEntry($storage, $internalPath, $directory);
- if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
- return [];
- }
- } else {
- $data = $directoryInfo;
- }
-
- if (!($data->getPermissions() & Constants::PERMISSION_READ)) {
+ if (!$directoryInfo) {
+ $data = $this->getCacheEntry($storage, $internalPath, $directory);
+ if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
return [];
}
+ } else {
+ $data = $directoryInfo;
+ }
+
+ if (!($data->getPermissions() & Constants::PERMISSION_READ)) {
+ return [];
+ }
- $folderId = $data->getId();
- $contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
+ $folderId = $data->getId();
+ $contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
$sharingDisabled = \OCP\Util::isSharingDisabledForUser();