Skip to content

Commit a7dd4e8

Browse files
authored
Merge pull request #56498 from nextcloud/fix/fix-deleting-broken-shares
fix(files_sharing): Allow deleting a share of a missing file
2 parents 3f083bb + cc66d20 commit a7dd4e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ public function deleteShare(string $id): DataResponse {
545545
$this->lock($share->getNode());
546546
} catch (LockedException $e) {
547547
throw new OCSNotFoundException($this->l->t('Could not delete share'));
548+
} catch (NotFoundException $e) {
549+
$this->logger->debug('File of to be deleted share was not found, skip locking', ['exception' => $e]);
548550
}
549551

550552
if (!$this->canAccessShare($share)) {

0 commit comments

Comments
 (0)