Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-26 20:56:13 +0400
committerRobin Appelman <icewind@owncloud.com>2012-01-26 20:56:13 +0400
commit935b828427454cc2e175bf0bb3e3cf168a3257c2 (patch)
treeaf6a4df46fa72e21219d1f8d32f0998b69caa4d4 /lib
parent63ae4b3dfc9466b8ba5e392a63b7cfb10d6980fc (diff)
initialize all storage backends when searching for a file, fixed searching in the Shared folder
Diffstat (limited to 'lib')
-rw-r--r--lib/filesystem.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index fd0ac3b6215..bd953deb210 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -226,6 +226,17 @@ class OC_Filesystem{
}
self::$mounts[$mountpoint]=array('type'=>$type,'arguments'=>$arguments);
}
+
+ /**
+ * create all storage backends mounted in the filesystem
+ */
+ static private function mountAll(){
+ foreach(self::$mounts as $mountPoint=>$mount){
+ if(!isset(self::$storages[$mountPoint])){
+ self::$storages[$mountPoint]=self::createStorage($mount['type'],$mount['arguments']);
+ }
+ }
+ }
/**
* get the storage object for a path
@@ -501,6 +512,7 @@ class OC_Filesystem{
}
static public function search($query){
+ self::mountAll();
$files=array();
$fakeRoot=self::$fakeRoot;
$fakeRootLength=strlen($fakeRoot);