fix getting mount points when passing a path to the files:scan command

This commit is contained in:
Robin Appelman 2015-06-22 14:02:38 +02:00
parent 5810e7ab87
commit 8ec7e9fac7

View file

@ -76,11 +76,10 @@ class Scanner extends PublicEmitter {
//TODO: move to the node based fileapi once that's done
\OC_Util::tearDownFS();
\OC_Util::setupFS($this->user);
$absolutePath = Filesystem::getView()->getAbsolutePath($dir);
$mountManager = Filesystem::getMountManager();
$mounts = $mountManager->findIn($absolutePath);
$mounts[] = $mountManager->find($absolutePath);
$mounts = $mountManager->findIn($dir);
$mounts[] = $mountManager->find($dir);
$mounts = array_reverse($mounts); //start with the mount of $dir
return $mounts;