Skip to content
Snippets Groups Projects
Commit e965dcae authored by Lukas Reschke's avatar Lukas Reschke
Browse files

/shareinfo is not required

parent 8f95d699
No related branches found
No related tags found
No related merge requests found
...@@ -90,6 +90,7 @@ class Scanner extends \OC\Files\Cache\Scanner { ...@@ -90,6 +90,7 @@ class Scanner extends \OC\Files\Cache\Scanner {
} }
if ($data['status'] === 'success') { if ($data['status'] === 'success') {
$this->addResult($data['data'], ''); $this->addResult($data['data'], '');
} elseif ($data['status'] === 'unsupported') {
} else { } else {
throw new \Exception( throw new \Exception(
'Error while scanning remote share: "' . 'Error while scanning remote share: "' .
......
...@@ -27,6 +27,7 @@ namespace OCA\Files_Sharing\External; ...@@ -27,6 +27,7 @@ namespace OCA\Files_Sharing\External;
use OC\Files\Storage\DAV; use OC\Files\Storage\DAV;
use OC\ForbiddenException; use OC\ForbiddenException;
use OCA\FederatedFileSharing\DiscoveryManager;
use OCA\Files_Sharing\ISharedStorage; use OCA\Files_Sharing\ISharedStorage;
use OCP\Files\NotFoundException; use OCP\Files\NotFoundException;
use OCP\Files\StorageInvalidException; use OCP\Files\StorageInvalidException;
...@@ -248,6 +249,12 @@ class Storage extends DAV implements ISharedStorage { ...@@ -248,6 +249,12 @@ class Storage extends DAV implements ISharedStorage {
$remote = $this->getRemote(); $remote = $this->getRemote();
$token = $this->getToken(); $token = $this->getToken();
$password = $this->getPassword(); $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; $url = rtrim($remote, '/') . '/index.php/apps/files_sharing/shareinfo?t=' . $token;
// TODO: DI // TODO: DI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment