From 935b828427454cc2e175bf0bb3e3cf168a3257c2 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 26 Jan 2012 17:56:13 +0100 Subject: [PATCH] initialize all storage backends when searching for a file, fixed searching in the Shared folder --- lib/filesystem.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); -- 2.39.5