aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/External/Manager.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-08 14:50:25 +0000
committerGitHub <noreply@github.com>2022-03-08 14:50:25 +0000
commite8872f01ae850bcbf66220beba44463f68e3d673 (patch)
tree9b2b1d01992d26368ff456af0440d0a2965308a6 /apps/files_sharing/lib/External/Manager.php
parent23e8ae15aaea30359a927492155de13c97b311ce (diff)
parent917c74e214094e321ff96e1aa067ae60d22e2c58 (diff)
downloadnextcloud-server-e8872f01ae850bcbf66220beba44463f68e3d673.tar.gz
nextcloud-server-e8872f01ae850bcbf66220beba44463f68e3d673.zip
Merge pull request #31431 from nextcloud/fs-setup-manager
Unify/cleanup filesystem setup
Diffstat (limited to 'apps/files_sharing/lib/External/Manager.php')
-rw-r--r--apps/files_sharing/lib/External/Manager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php
index a48e2a63ae4..a8510321a5a 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -43,6 +43,7 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Files;
+use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorageFactory;
use OCP\Http\Client\IClientService;
use OCP\IDBConnection;
@@ -599,8 +600,9 @@ class Manager {
}
public function removeShare($mountPoint): bool {
- $mountPointObj = $this->mountManager->find($mountPoint);
- if ($mountPointObj === null) {
+ try {
+ $mountPointObj = $this->mountManager->find($mountPoint);
+ } catch (NotFoundException $e) {
$this->logger->error('Mount point to remove share not found', ['mountPoint' => $mountPoint]);
return false;
}