Dont return cached date in shared cache when the file doesn't exist

This commit is contained in:
Robin Appelman 2014-12-02 15:28:11 +01:00
parent e9029f94cb
commit ce10b93519
1 changed files with 12 additions and 10 deletions

View File

@ -89,16 +89,18 @@ class Shared_Cache extends Cache {
$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;
}