/shareinfo is not required
This commit is contained in:
parent
8f95d69954
commit
e965dcaebf
2 changed files with 8 additions and 0 deletions
1
apps/files_sharing/lib/external/scanner.php
vendored
1
apps/files_sharing/lib/external/scanner.php
vendored
|
@ -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: "' .
|
||||
|
|
7
apps/files_sharing/lib/external/storage.php
vendored
7
apps/files_sharing/lib/external/storage.php
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue