Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions apps/files_sharing/lib/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,16 @@ protected function formatCacheEntry($entry, $path = null) {
}

try {
$sharePermissions = $this->storage->getPermissions($entry['path']);
if (isset($entry['permissions'])) {
$entry['permissions'] &= $this->storage->getShare()->getPermissions();
} else {
$entry['permissions'] = $this->storage->getPermissions($entry['path']);
}
} catch (StorageNotAvailableException $e) {
// thrown by FailedStorage e.g. when the sharer does not exist anymore
// (IDE may say the exception is never thrown – false negative)
$sharePermissions = 0;
}
if (isset($entry['permissions'])) {
$entry['permissions'] &= $sharePermissions;
} else {
$entry['permissions'] = $sharePermissions;
}
$entry['uid_owner'] = $this->storage->getOwner('');
$entry['displayname_owner'] = $this->getOwnerDisplayName();
if ($path === '') {
Expand Down