Skip to content

Commit

Permalink
Merge pull request nextcloud#12549 from owncloud/shared-cache-non-exi…
Browse files Browse the repository at this point in the history
…sting

Dont return cached date in shared cache when the file doesn't exist
  • Loading branch information
MorrisJobke committed Dec 10, 2014
2 parents ea95bb0 + ce10b93 commit 3026cdb
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions apps/files_sharing/lib/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,18 @@ public function get($file) {
$cache = $this->getSourceCache($file);
if ($cache) {
$data = $cache->get($this->files[$file]);
$data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom());
$data['path'] = $file;
if ($file === '') {
$data['is_share_mount_point'] = true;
}
$data['uid_owner'] = $this->storage->getOwner($file);
if (isset($data['permissions'])) {
$data['permissions'] &= $this->storage->getPermissions($file);
} else {
$data['permissions'] = $this->storage->getPermissions($file);
if ($data) {
$data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom());
$data['path'] = $file;
if ($file === '') {
$data['is_share_mount_point'] = true;
}
$data['uid_owner'] = $this->storage->getOwner($file);
if (isset($data['permissions'])) {
$data['permissions'] &= $this->storage->getPermissions($file);
} else {
$data['permissions'] = $this->storage->getPermissions($file);
}
}
return $data;
}
Expand Down

0 comments on commit 3026cdb

Please sign in to comment.