From 9a5d0f6084c7ecb491e4a1c971b125ac57eeb5da Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 28 Sep 2014 16:32:27 +0200 Subject: Fix add/remove mountpoint hooks --- apps/files_external/lib/config.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/files_external/lib') diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 0b5e833a704..604700ccf57 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -463,6 +463,7 @@ class OC_Mount_Config { $priority = null) { $backends = self::getBackends(); $mountPoint = OC\Files\Filesystem::normalizePath($mountPoint); + $relMountPoint = $mountPoint; if ($mountPoint === '' || $mountPoint === '/') { // can't mount at root folder return false; @@ -520,7 +521,7 @@ class OC_Mount_Config { \OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create_mount, array( - \OC\Files\Filesystem::signal_param_path => $mountPoint, + \OC\Files\Filesystem::signal_param_path => $relMountPoint, \OC\Files\Filesystem::signal_param_mount_type => $mountType, \OC\Files\Filesystem::signal_param_users => $applicable, ) @@ -539,6 +540,7 @@ class OC_Mount_Config { */ public static function removeMountPoint($mountPoint, $mountType, $applicable, $isPersonal = false) { // Verify that the mount point applies for the current user + $relMountPoints = $mountPoint; if ($isPersonal) { if ($applicable != OCP\User::getUser()) { return false; @@ -563,7 +565,7 @@ class OC_Mount_Config { \OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_delete_mount, array( - \OC\Files\Filesystem::signal_param_path => $mountPoint, + \OC\Files\Filesystem::signal_param_path => $relMountPoints, \OC\Files\Filesystem::signal_param_mount_type => $mountType, \OC\Files\Filesystem::signal_param_users => $applicable, ) -- cgit v1.2.3