summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-12-28 15:06:12 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2012-12-28 15:06:12 -0500
commit8bdfb040565eafb33bc27305463eb08374f14e32 (patch)
tree29a751ae13906060c7b2d6059b7c9688465b86f0 /apps/files_sharing/lib
parentb03562670973fd924a042064644994639a59667d (diff)
downloadnextcloud-server-8bdfb040565eafb33bc27305463eb08374f14e32.tar.gz
nextcloud-server-8bdfb040565eafb33bc27305463eb08374f14e32.zip
Fix shared folders
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/cache.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 196e767cf6e..d2ac8ccaaad 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -30,6 +30,10 @@ class Shared_Cache extends Cache {
private $files = array();
+ public function __construct($storage) {
+
+ }
+
/**
* @brief Get the source cache of a shared file or folder
* @param string Shared target file path
@@ -41,8 +45,12 @@ class Shared_Cache extends Cache {
$source['path'] = '/'.$source['uid_owner'].'/'.$source['path'];
\OC\Files\Filesystem::initMountPoints($source['uid_owner']);
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source['path']);
- $this->files[$target] = $internalPath;
- return $storage->getCache();
+ if ($storage) {
+ $this->files[$target] = $internalPath;
+ $cache = $storage->getCache();
+ $this->numericId = $cache->getNumericStorageId();
+ return $cache;
+ }
}
return false;
}
@@ -83,8 +91,11 @@ class Shared_Cache extends Cache {
if ($folder == '') {
return \OCP\Share::getItemsSharedWith('file', \OC_Share_Backend_File::FORMAT_GET_FOLDER_CONTENTS);
} else {
- return $this->getSourceCache($folder)->getFolderContents('/'.$this->files[$folder]);
+ if ($cache = $this->getSourceCache($folder)) {
+ return $cache->getFolderContents($this->files[$folder]);
+ }
}
+ return false;
}
/**