Do not getShare in deleteShare, it's already there when deleting

This commit is contained in:
Joas Schilling 2016-02-11 10:51:58 +01:00 committed by Roeland Jago Douma
parent 5165998723
commit ee080a9bc3
1 changed files with 2 additions and 2 deletions

View File

@ -695,9 +695,9 @@ class Manager implements IManager {
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function deleteShare(\OCP\Share\IShare $share) { public function deleteShare(\OCP\Share\IShare $share) {
// Just to make sure we have all the info
try { try {
$share = $this->getShareById($share->getFullId()); $share->getFullId();
} catch (\UnexpectedValueException $e) { } catch (\UnexpectedValueException $e) {
throw new \InvalidArgumentException('Share does not have a full id'); throw new \InvalidArgumentException('Share does not have a full id');
} }