summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-06-22 12:22:19 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-06-22 12:22:42 -0400
commit618a3c1d94980ab6de8eadc0a491cd324cea2285 (patch)
tree956fb829adfe5d64ba3f443087255b12b4b7dcce /apps/files_external
parentb650f4669829064805fdeb5fb85ae0de88e35966 (diff)
downloadnextcloud-server-618a3c1d94980ab6de8eadc0a491cd324cea2285.tar.gz
nextcloud-server-618a3c1d94980ab6de8eadc0a491cd324cea2285.zip
Fix removing personal mounts
Diffstat (limited to 'apps/files_external')
-rwxr-xr-xapps/files_external/lib/config.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 870c13b5aed..5b9e00a3783 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -157,12 +157,17 @@ class OC_Mount_Config {
*/
public static function removeMountPoint($mountPoint, $mountType, $applicable, $isPersonal = false) {
// Verify that the mount point applies for the current user
- if ($isPersonal && $applicable != OCP\User::getUser()) {
- return false;
+ if ($isPersonal) {
+ if ($applicable != OCP\User::getUser()) {
+ return false;
+ }
+ $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/');
+ } else {
+ $mountPoint = '/$user/files/'.ltrim($mountPoint, '/');
}
$mountPoints = self::readData($isPersonal);
// Remove mount point
- unset($mountPoints[$mountType][$applicable]['/$user/files/'.$mountPoint]);
+ unset($mountPoints[$mountType][$applicable][$mountPoint]);
// Unset parent arrays if empty
if (empty($mountPoints[$mountType][$applicable])) {
unset($mountPoints[$mountType][$applicable]);