Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-02-23 20:29:08 +0300
committerRobin Appelman <robin@icewind.nl>2022-03-04 18:29:59 +0300
commit1c468129afa2b2ec4a370a879f8eaffd22768baf (patch)
tree1c096e8c0a62371965104684e1f1bf2ef55eb2d4 /apps/files_sharing/lib
parent5c0fe934988960ece3ac71d5a1dfc8df405413aa (diff)
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-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;
}