fix(files_sharing): Allow deleting a share of a missing file

This can happen in various scenarios, we should allow the user to delete
 the share in this situation.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/56498/head
Côme Chilliet 2 months ago committed by Côme Chilliet
parent 0f5bf92456
commit a60f9494ec
  1. 2
      apps/files_sharing/lib/Controller/ShareAPIController.php

@ -545,6 +545,8 @@ class ShareAPIController extends OCSController {
$this->lock($share->getNode());
} catch (LockedException $e) {
throw new OCSNotFoundException($this->l->t('Could not delete share'));
} catch (NotFoundException $e) {
$this->logger->debug('File of deleted share was not found, skip locking', ['exception' => $e]);
}
if (!$this->canAccessShare($share)) {

Loading…
Cancel
Save