aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/lib/cache.php17
-rw-r--r--lib/files/filesystem.php1
-rwxr-xr-xlib/util.php1
3 files changed, 15 insertions, 4 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;
}
/**
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index c5b56ba9f01..8183b8ff99c 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -276,6 +276,7 @@ class Filesystem {
}
// Load personal mount points
$root = \OC_User::getHome($user);
+ self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
if (is_file($root.'/mount.php')) {
$mountConfig = include $root.'/mount.php';
if (isset($mountConfig['user'][$user])) {
diff --git a/lib/util.php b/lib/util.php
index 4ebc2564d1c..c5a495234d0 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -51,7 +51,6 @@ class OC_Util {
mkdir( $userdirectory, 0755, true );
}
//jail the user into his "home" directory
- \OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir' => $user_root), $user);
\OC\Files\Filesystem::init($user_dir);
$quotaProxy=new OC_FileProxy_Quota();