diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/cache.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index 67a0410ef76..a30bb865e57 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -54,7 +54,7 @@ class Shared_Cache extends Cache { if (isset($source['path']) && isset($source['fileOwner'])) { \OC\Files\Filesystem::initMountPoints($source['fileOwner']); $mounts = \OC\Files\Filesystem::getMountByNumericId($source['storage']); - if (is_array($mounts) and count($mounts)) { + if (is_array($mounts) and !empty($mounts)) { $fullPath = $mounts[0]->getMountPoint() . $source['path']; list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($fullPath); if ($storage) { diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 5e478d5ead8..2252ec6a1a6 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -87,10 +87,11 @@ class Shared extends \OC\Files\Storage\Common { if (!isset($source['fullPath'])) { \OC\Files\Filesystem::initMountPoints($source['fileOwner']); $mount = \OC\Files\Filesystem::getMountByNumericId($source['storage']); - if (is_array($mount)) { + if (is_array($mount) && !empty($mount)) { $this->files[$target]['fullPath'] = $mount[key($mount)]->getMountPoint() . $source['path']; } else { $this->files[$target]['fullPath'] = false; + \OCP\Util::writeLog('files_sharing', "Unable to get mount for shared storage '" . $source['storage'] . "' user '" . $source['fileOwner'] . "'", \OCP\Util::ERROR); } } return $this->files[$target]['fullPath']; |