summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-06-10 16:34:21 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-06-10 16:34:44 -0400
commit3c57fb935bec7b431596c8aec3f344df7dba354a (patch)
tree75ac7d4b05193e99af14a9e34313e98f10fa12d0 /apps/files_external
parentdd8303b9752cec02fa26b190c24a578fddc4e9c0 (diff)
downloadnextcloud-server-3c57fb935bec7b431596c8aec3f344df7dba354a.tar.gz
nextcloud-server-3c57fb935bec7b431596c8aec3f344df7dba354a.zip
Mount personal mount points into filesystem
Diffstat (limited to 'apps/files_external')
-rwxr-xr-xapps/files_external/lib/config.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index a87319d33b2..56a61e9ab89 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -98,8 +98,8 @@ class OC_Mount_Config {
$personal = array();
if (isset($mountPoints[self::MOUNT_TYPE_USER][$uid])) {
foreach ($mountPoints[self::MOUNT_TYPE_USER][$uid] as $mountPoint => $mount) {
- // Remove '/$user/files/' from mount point
- $personal[substr($mountPoint, 13)] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options']);
+ // Remove '/uid/files/' from mount point
+ $personal[substr($mountPoint, strlen($uid) + 8)] = array('class' => $mount['class'], 'backend' => $backends[$mount['class']]['backend'], 'configuration' => $mount['options']);
}
}
return $personal;
@@ -123,8 +123,11 @@ class OC_Mount_Config {
if ($applicable != OCP\User::getUser() || $class == 'OC_Filestorage_Local') {
return false;
}
+ $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/');
+ } else {
+ $mountPoint = '/$user/files/'.ltrim($mountPoint, '/');
}
- $mount = array($applicable => array('/$user/files/'.$mountPoint => array('class' => $class, 'options' => $classOptions)));
+ $mount = array($applicable => array($mountPoint => array('class' => $class, 'options' => $classOptions)));
$mountPoints = self::readData($isPersonal);
// Merge the new mount point into the current mount points
if (isset($mountPoints[$mountType])) {