Skip to content

Commit

Permalink
Merge pull request #21181 from nextcloud/fix/remote-share-remove-erro…
Browse files Browse the repository at this point in the history
…r-handling

Do not only catch Exceptions but any Throwable during rmt share delete
  • Loading branch information
ChristophWurst authored Jun 3, 2020
2 parents f62f23e + 09a6322 commit 111c8c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files_sharing/lib/External/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public function removeShare($mountPoint) {
if ($result && $share !== false && (int)$share['share_type'] === Share::SHARE_TYPE_USER) {
try {
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
} catch (\Exception $e) {
} catch (\Throwable $e) {
// if we fail to notify the remote (probably cause the remote is down)
// we still want the share to be gone to prevent undeletable remotes
}
Expand Down Expand Up @@ -630,7 +630,7 @@ private function getShares($accepted) {
}

$query = 'SELECT `id`, `remote`, `remote_id`, `share_token`, `name`, `owner`, `user`, `mountpoint`, `accepted`
FROM `*PREFIX*share_external`
FROM `*PREFIX*share_external`
WHERE (`user` = ? OR `user` IN (?))';
$parameters = [$this->uid, implode(',',$userGroups)];
if (!is_null($accepted)) {
Expand Down

0 comments on commit 111c8c9

Please sign in to comment.