|
35 | 35 | use OCP\ICacheFactory; |
36 | 36 | use OCP\IConfig; |
37 | 37 | use OCP\IUserSession; |
38 | | -use OCP\OCM\Exceptions\OCMArgumentException; |
39 | | -use OCP\OCM\Exceptions\OCMProviderException; |
40 | 38 | use OCP\OCM\IOCMDiscoveryService; |
41 | 39 | use OCP\Server; |
42 | 40 | use OCP\Share\IManager as IShareManager; |
@@ -78,18 +76,10 @@ public function __construct($options) { |
78 | 76 | $this->appConfig = Server::get(IAppConfig::class); |
79 | 77 | $this->shareManager = Server::get(IShareManager::class); |
80 | 78 |
|
81 | | - // use default path to webdav if not found on discovery |
82 | | - try { |
83 | | - $ocmProvider = $discoveryService->discover($this->cloudId->getRemote()); |
84 | | - $webDavEndpoint = $ocmProvider->extractProtocolEntry('file', 'webdav'); |
85 | | - $remote = $ocmProvider->getEndPoint(); |
86 | | - $authType = \Sabre\DAV\Client::AUTH_BASIC; |
87 | | - } catch (OCMProviderException|OCMArgumentException $e) { |
88 | | - $this->logger->notice('exception while retrieving webdav endpoint', ['exception' => $e]); |
89 | | - $webDavEndpoint = '/public.php/webdav'; |
90 | | - $remote = $this->cloudId->getRemote(); |
91 | | - $authType = \Sabre\DAV\Client::AUTH_BASIC; |
92 | | - } |
| 79 | + $ocmProvider = $discoveryService->discover($this->cloudId->getRemote()); |
| 80 | + $webDavEndpoint = $ocmProvider->extractProtocolEntry('file', 'webdav'); |
| 81 | + $remote = $ocmProvider->getEndPoint(); |
| 82 | + $authType = \Sabre\DAV\Client::AUTH_BASIC; |
93 | 83 |
|
94 | 84 | // Only use Bearer auth when an access token is already stored. |
95 | 85 | // Shares created before the exchange-token capability was introduced have no |
|
0 commit comments