diff --git a/lib/filesystem.php b/lib/filesystem.php index fd0ac3b621575063d96bf38a0306cd3a1e3dcc74..bd953deb2107dc3188aeb0cfb12f0b6e8a521ac8 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);