diff options
author | Robin Appelman <robin@icewind.nl> | 2016-10-27 14:26:13 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-11-16 15:30:36 +0100 |
commit | 0ee958595e42bc29543e294958b2090b80f85d2d (patch) | |
tree | 899a93c0b9df5f3054bd9ddaeb8798ad01cb5a37 /lib | |
parent | eefd0597166b26b85690fba784d843486badefef (diff) | |
download | nextcloud-server-0ee958595e42bc29543e294958b2090b80f85d2d.tar.gz nextcloud-server-0ee958595e42bc29543e294958b2090b80f85d2d.zip |
Improve isMounted to handle primary storage object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/FileInfo.php | 7 | ||||
-rw-r--r-- | lib/private/Files/Mount/ObjectHomeMountProvider.php | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 14a32ba8f76..3ad2932e597 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -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'); diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php index 87878562a42..440a8bc4608 100644 --- a/lib/private/Files/Mount/ObjectHomeMountProvider.php +++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php @@ -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) { |