diff options
-rw-r--r-- | apps/files_sharing/lib/external/scanner.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/external/storage.php | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/external/scanner.php index 3335fc4707c..bfb9e817f09 100644 --- a/apps/files_sharing/lib/external/scanner.php +++ b/apps/files_sharing/lib/external/scanner.php @@ -90,6 +90,7 @@ class Scanner extends \OC\Files\Cache\Scanner { } if ($data['status'] === 'success') { $this->addResult($data['data'], ''); + } elseif ($data['status'] === 'unsupported') { } else { throw new \Exception( 'Error while scanning remote share: "' . diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index c23b273c2eb..514df41eac9 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -27,6 +27,7 @@ namespace OCA\Files_Sharing\External; use OC\Files\Storage\DAV; use OC\ForbiddenException; +use OCA\FederatedFileSharing\DiscoveryManager; use OCA\Files_Sharing\ISharedStorage; use OCP\Files\NotFoundException; use OCP\Files\StorageInvalidException; @@ -248,6 +249,12 @@ class Storage extends DAV implements ISharedStorage { $remote = $this->getRemote(); $token = $this->getToken(); $password = $this->getPassword(); + + // If remote is not an ownCloud do not try to get any share info + if(!$this->testRemoteUrl($remote . '/status.php')) { + return ['status' => 'unsupported']; + } + $url = rtrim($remote, '/') . '/index.php/apps/files_sharing/shareinfo?t=' . $token; // TODO: DI |