From a60f9494ec328f3202fe587ea247caac8faaaf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 17 Nov 2025 17:30:46 +0100 Subject: [PATCH] fix(files_sharing): Allow deleting a share of a missing file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This can happen in various scenarios, we should allow the user to delete the share in this situation. Signed-off-by: Côme Chilliet --- apps/files_sharing/lib/Controller/ShareAPIController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index fb8a702cbd4..0c7325d096f 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/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)) {