aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-24 23:41:39 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-24 23:41:39 +0100
commit709aacfa0fef29692bff231f09625db5ba0bef6f (patch)
tree1be698b156a5d30db5cb2a353ff7b8ef058d0692 /lib/files/filesystem.php
parentd3e37fa157faa59598e92a9aa02c6bbf818b60e0 (diff)
downloadnextcloud-server-709aacfa0fef29692bff231f09625db5ba0bef6f.tar.gz
nextcloud-server-709aacfa0fef29692bff231f09625db5ba0bef6f.zip
change behaviour of Filesystem::getMountPoint when a mountpoint is passed as path without trailing slash
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index 9e8ce3ec184..4e3eb1989b7 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -144,13 +144,7 @@ class Filesystem {
*/
static public function getMountPoint($path) {
\OC_Hook::emit(self::CLASSNAME, 'get_mountpoint', array('path' => $path));
- if (!$path) {
- $path = '/';
- }
- if ($path[0] !== '/') {
- $path = '/' . $path;
- }
- $path = str_replace('//', '/', $path);
+ $path = self::normalizePath($path) . '/';
$foundMountPoint = '';
$mountPoints = array_keys(self::$mounts);
foreach ($mountPoints as $mountpoint) {