summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-04-15 16:36:05 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-04-23 12:54:26 +0200
commit2049bedcaf670ef2394ce8b19e0d3f2174513b53 (patch)
tree22d62b6b177cd34872ef4fdb3efbccabcccae94e
parentfb88aba8f4927b3175df34a2a499978a3b4c1b6b (diff)
downloadnextcloud-server-2049bedcaf670ef2394ce8b19e0d3f2174513b53.tar.gz
nextcloud-server-2049bedcaf670ef2394ce8b19e0d3f2174513b53.zip
Dont throw an error when a storage isn't found for shared cache
-rw-r--r--apps/files_sharing/lib/cache.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 4b473c60577..4a2f0ff08b2 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -53,9 +53,9 @@ class Shared_Cache extends Cache {
$source = \OC_Share_Backend_File::getSource($target, $this->storage->getMountPoint(), $this->storage->getItemType());
if (isset($source['path']) && isset($source['fileOwner'])) {
\OC\Files\Filesystem::initMountPoints($source['fileOwner']);
- $mount = \OC\Files\Filesystem::getMountByNumericId($source['storage']);
- if (is_array($mount)) {
- $fullPath = $mount[key($mount)]->getMountPoint() . $source['path'];
+ $mounts = \OC\Files\Filesystem::getMountByNumericId($source['storage']);
+ if (is_array($mounts) and count($mounts)) {
+ $fullPath = $mounts[0]->getMountPoint() . $source['path'];
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($fullPath);
if ($storage) {
$this->files[$target] = $internalPath;