diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-17 16:29:39 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-17 16:29:39 +0300 |
commit | 00ef623f1ca5cf6bd2f285b1523e2e25ca676eeb (patch) | |
tree | b0765c0ca5a9eb8b53f2bea79ea71b93923615e8 | |
parent | ec4c5a3e75c7e8d62b9c62c5a6750493627446ee (diff) | |
parent | 987146d5db56ac95bc388944bf484615139f7ea3 (diff) |
Merge pull request #23259 from owncloud/backport-22998
[stable9] Delay check till scanner is used
-rw-r--r-- | apps/files_sharing/lib/external/scanner.php | 5 | ||||
-rw-r--r-- | apps/files_sharing/lib/external/storage.php | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/external/scanner.php index bfb9e817f09..1cc6cf8f5f9 100644 --- a/apps/files_sharing/lib/external/scanner.php +++ b/apps/files_sharing/lib/external/scanner.php @@ -36,6 +36,10 @@ class Scanner extends \OC\Files\Cache\Scanner { /** {@inheritDoc} */ public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { + if(!$this->storage->remoteIsOwnCloud()) { + return parent::scan($path, $recursive, $recursive, $lock); + } + $this->scanAll(); } @@ -90,7 +94,6 @@ 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 80ab006f1ca..999e7e32292 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -148,9 +148,6 @@ class Storage extends DAV implements ISharedStorage { if (!$storage) { $storage = $this; } - if(!$this->remoteIsOwnCloud()) { - return parent::getScanner($path, $storage); - } if (!isset($this->scanner)) { $this->scanner = new Scanner($storage); } @@ -270,7 +267,7 @@ class Storage extends DAV implements ISharedStorage { * * @return bool */ - private function remoteIsOwnCloud() { + public function remoteIsOwnCloud() { if(defined('PHPUNIT_RUN') || !$this->testRemoteUrl($this->getRemote() . '/status.php')) { return false; } |