summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-05-22 01:53:33 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-06 09:55:59 +0200
commita66c2e6a4757b5d97e120897df1085e4410b279a (patch)
tree4936501626bcf857fed53e5f11c72a41d83398b9 /apps/files_external
parent4fbc991ea2bd66f1f918c9c6abf501ca767a8a8d (diff)
downloadnextcloud-server-a66c2e6a4757b5d97e120897df1085e4410b279a.tar.gz
nextcloud-server-a66c2e6a4757b5d97e120897df1085e4410b279a.zip
Fix the removeMount for personal mounts
Diffstat (limited to 'apps/files_external')
-rwxr-xr-xapps/files_external/lib/config.php1
-rw-r--r--apps/files_external/lib/personalmount.php4
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 46c4f94eec6..6f78e569b64 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -517,6 +517,7 @@ class OC_Mount_Config {
} else {
$mountPoint = '/$user/files/'.ltrim($mountPoint, '/');
}
+ $mountPoint = \OC\Files\Filesystem::normalizePath($mountPoint);
$mountPoints = self::readData($isPersonal ? OCP\User::getUser() : NULL);
// Remove mount point
unset($mountPoints[$mountType][$applicable][$mountPoint]);
diff --git a/apps/files_external/lib/personalmount.php b/apps/files_external/lib/personalmount.php
index c3e97092520..708128d644a 100644
--- a/apps/files_external/lib/personalmount.php
+++ b/apps/files_external/lib/personalmount.php
@@ -33,6 +33,8 @@ class PersonalMount extends Mount implements MoveableMount {
* @return bool
*/
public function removeMount() {
- return \OC_Mount_Config::removeMountPoint($this->mountPoint, \OC_Mount_Config::MOUNT_TYPE_USER, \OCP\User::getUser(), true);
+ $user = \OCP\User::getUser();
+ $relativeMountPoint = substr($this->getMountPoint(), strlen('/' . $user . '/files/'));
+ return \OC_Mount_Config::removeMountPoint($relativeMountPoint, \OC_Mount_Config::MOUNT_TYPE_USER, $user , true);
}
}