summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Mount/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Mount/Manager.php')
-rw-r--r--lib/private/Files/Mount/Manager.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php
index eb5d4c4a458..7f21a1e7f99 100644
--- a/lib/private/Files/Mount/Manager.php
+++ b/lib/private/Files/Mount/Manager.php
@@ -79,9 +79,11 @@ class Manager implements IMountManager {
\OC_Hook::emit('OC_Filesystem', 'get_mountpoint', ['path' => $path]);
$foundMountPoint = '';
$mountPoints = array_keys($this->mounts);
+ $foundMountPointLength = 0;
foreach ($mountPoints as $mountpoint) {
- if (strpos($path, $mountpoint) === 0 && \strlen($mountpoint) > \strlen($foundMountPoint)) {
+ if (strpos($path, $mountpoint) === 0 && \strlen($mountpoint) > $foundMountPointLength) {
$foundMountPoint = $mountpoint;
+ $foundMountPointLength = \strlen($foundMountPoint);
}
}