diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-01-26 17:56:13 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-01-26 17:56:13 +0100 |
commit | 935b828427454cc2e175bf0bb3e3cf168a3257c2 (patch) | |
tree | af6a4df46fa72e21219d1f8d32f0998b69caa4d4 /lib/filesystem.php | |
parent | 63ae4b3dfc9466b8ba5e392a63b7cfb10d6980fc (diff) | |
download | nextcloud-server-935b828427454cc2e175bf0bb3e3cf168a3257c2.tar.gz nextcloud-server-935b828427454cc2e175bf0bb3e3cf168a3257c2.zip |
initialize all storage backends when searching for a file, fixed searching in the Shared folder
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r-- | lib/filesystem.php | 12 |
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); |