Improve isMounted to handle primary storage object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
eefd059716
commit
0ee958595e
|
@ -33,6 +33,7 @@ namespace OC\Files;
|
|||
use OCP\Files\Cache\ICacheEntry;
|
||||
use OCP\Files\Mount\IMountPoint;
|
||||
use OCP\Files\Storage\IStorage;
|
||||
use OCP\Files\IHomeStorage;
|
||||
use OCP\IUser;
|
||||
|
||||
class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
|
||||
|
@ -305,7 +306,11 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
|
|||
}
|
||||
|
||||
public function isMounted() {
|
||||
$sid = $this->getStorage()->getId();
|
||||
$storage = $this->getStorage();
|
||||
if ($storage->instanceOfStorage('\OCP\Files\IHomeStorage')) {
|
||||
return false;
|
||||
}
|
||||
$sid = $storage->getId();
|
||||
if (!is_null($sid)) {
|
||||
$sid = explode(':', $sid);
|
||||
return ($sid[0] !== 'home' and $sid[0] !== 'shared');
|
||||
|
|
|
@ -51,7 +51,7 @@ class ObjectHomeMountProvider implements IHomeMountProvider {
|
|||
*
|
||||
* @param IUser $user
|
||||
* @param IStorageFactory $loader
|
||||
* @return \OCP\Files\Mount\IMountPoint[]
|
||||
* @return \OCP\Files\Mount\IMountPoint
|
||||
*/
|
||||
public function getHomeMountForUser(IUser $user, IStorageFactory $loader) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue