make sure that we always return the correct permissions

This commit is contained in:
Bjoern Schiessle 2014-06-24 13:39:37 +02:00
parent 6a4a474aa9
commit 84d36df70b
2 changed files with 5 additions and 5 deletions

View file

@ -95,9 +95,9 @@ class Shared_Cache extends Cache {
}
$data['uid_owner'] = $this->storage->getOwner($file);
if (isset($data['permissions'])) {
$data['permissions'] &= $this->storage->getPermissions('');
$data['permissions'] &= $this->storage->getPermissions($file);
} else {
$data['permissions'] = $this->storage->getPermissions('');
$data['permissions'] = $this->storage->getPermissions($file);
}
return $data;
}
@ -163,7 +163,7 @@ class Shared_Cache extends Cache {
$sourceFolderContent[$key]['path'] = $dir . $c['name'];
$sourceFolderContent[$key]['uid_owner'] = $parent['uid_owner'];
$sourceFolderContent[$key]['displayname_owner'] = $parent['uid_owner'];
$sourceFolderContent[$key]['permissions'] = $sourceFolderContent[$key]['permissions'] & $this->storage->getPermissions('');
$sourceFolderContent[$key]['permissions'] = $sourceFolderContent[$key]['permissions'] & $this->storage->getPermissions($dir . $c['name']);
}
return $sourceFolderContent;

View file

@ -884,8 +884,8 @@ class View {
if ($extOnly && $subStorage instanceof \OC\Files\Storage\Shared) {
continue;
}
$subCache = $subStorage->getCache('');
$rootEntry = $subCache->get('');
$subCache = $subStorage->getCache($internalPath);
$rootEntry = $subCache->get($internalPath);
$data['size'] += isset($rootEntry['size']) ? $rootEntry['size'] : 0;
}
}