gracefully handle deleteFromSelf when share is already gone

- handling race conditions

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/26382/head
Arthur Schiwon 5 years ago committed by backportbot[bot]
parent b2072cd6fc
commit caec3a8cee
  1. 3
      lib/private/Share20/DefaultShareProvider.php
  2. 3
      tests/lib/Share20/DefaultShareProviderTest.php

@ -470,7 +470,8 @@ class DefaultShareProvider implements IShareProvider {
}
if (!$group->inGroup($user)) {
throw new ProviderException('Recipient not in receiving group');
// nothing left to do
return;
}
// Try to fetch user specific share

@ -1558,9 +1558,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
public function testDeleteFromSelfGroupUserNotInGroup() {
$this->expectException(\OC\Share20\Exception\ProviderException::class);
$this->expectExceptionMessage('Recipient not in receiving group');
$qb = $this->dbConn->getQueryBuilder();
$stmt = $qb->insert('share')
->values([

Loading…
Cancel
Save