diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/external/scanner.php
index bfb9e817f0944f27cd5b069008bdd0bf3cac42fc..1cc6cf8f5f947e9258817eb98c3934bc421d2b61 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 16fd84bdba5aed85f59450b364708dab04c6e71c..8fe7af66044ce65f5621aaad9a5ad597a881c1ea 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -136,9 +136,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);
 		}
@@ -266,7 +263,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;
 		}