mirror of
https://github.com/nextcloud/server.git
synced 2026-03-01 04:50:40 -05:00
Merge pull request #31878 from nextcloud/backport/31754/stable23
[stable23] Fix incorrect if conditions in View
This commit is contained in:
commit
bc52905ad0
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue