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:
authorblizzz <blizzz@arthur-schiwon.de>2022-04-14 23:01:27 +0300
committerGitHub <noreply@github.com>2022-04-14 23:01:27 +0300
commitd455b2d21bc353cb1dc6e614b94e77ea5d372b15 (patch)
tree2d8f860f34f9d9ac43c7cc4e2402a09f01d3b79b
parent75a4579cd758632be304c91233d3a2d4cffc004e (diff)
parent8b1e16c4dfc7c5e5eb0c557b86831adc0664778f (diff)
Merge pull request #31974 from nextcloud/backport/31878/stable22
[stable22] Fix incorrect if conditions in View
-rw-r--r--lib/private/Files/View.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 4e3966b711c..141918918e6 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1179,7 +1179,7 @@ class View {
throw $e;
}
- if ($result && in_array('delete', $hooks) and $result) {
+ if ($result && in_array('delete', $hooks)) {
$this->removeUpdate($storage, $internalPath);
}
if ($result && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') {
@@ -1453,7 +1453,7 @@ class View {
$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 [];
}
@@ -1507,7 +1507,7 @@ class View {
$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