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>
This commit is contained in:
Côme Chilliet 2025-11-17 17:30:46 +01:00 committed by Côme Chilliet
parent 0f5bf92456
commit a60f9494ec

View file

@ -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)) {