From 87b0021e5606888642b5798ba39b0525bf3f3e14 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 19 May 2014 16:39:57 +0200 Subject: Scan the entire remote share at once by requesting the full file tree from the remote server --- apps/files_sharing/ajax/external.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing/ajax/external.php') diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php index e7bf903f705..c25b34ab552 100644 --- a/apps/files_sharing/ajax/external.php +++ b/apps/files_sharing/ajax/external.php @@ -23,6 +23,13 @@ $externalManager = new \OCA\Files_Sharing\External\Manager( ); $mount = $externalManager->addShare($remote, $token, $password, $name, $owner); -$result = $mount->getStorage()->file_exists(''); +/** + * @var \OCA\Files_Sharing\External\Storage $storage + */ +$storage = $mount->getStorage(); +$result = $storage->file_exists(''); +if($result){ + $storage->getScanner()->scanAll(); +} echo json_encode($result); -- cgit v1.2.3