initialize all storage backends when searching for a file, fixed searching in the Shared folder
This commit is contained in:
parent
63ae4b3dfc
commit
935b828427
|
@ -227,6 +227,17 @@ class OC_Filesystem{
|
||||||
self::$mounts[$mountpoint]=array('type'=>$type,'arguments'=>$arguments);
|
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
|
* get the storage object for a path
|
||||||
* @param string path
|
* @param string path
|
||||||
|
@ -501,6 +512,7 @@ class OC_Filesystem{
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function search($query){
|
static public function search($query){
|
||||||
|
self::mountAll();
|
||||||
$files=array();
|
$files=array();
|
||||||
$fakeRoot=self::$fakeRoot;
|
$fakeRoot=self::$fakeRoot;
|
||||||
$fakeRootLength=strlen($fakeRoot);
|
$fakeRootLength=strlen($fakeRoot);
|
||||||
|
|
Loading…
Reference in New Issue