aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-07 17:32:06 +0100
committerGitHub <noreply@github.com>2017-11-07 17:32:06 +0100
commit19069f2b9c0aff5cf02f76856f34436690547c58 (patch)
tree837c21bbcd3c8acd0cf56d9f96c69aee6f6d4683 /lib
parent469db9fbb9dd20a6cbab6fe21afabca93019cde8 (diff)
parent07016a1e5b19e56bb1c987b175a73b9dcd8ed692 (diff)
downloadnextcloud-server-19069f2b9c0aff5cf02f76856f34436690547c58.tar.gz
nextcloud-server-19069f2b9c0aff5cf02f76856f34436690547c58.zip
Merge pull request #6988 from starypatyk/stable12-mount-cache-performance
Improve performance of UserMountCache with external storage folders
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Config/UserMountCache.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index eeb6c31d8ff..b8abd7e17de 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -195,7 +195,11 @@ class UserMountCache implements IUserMountCache {
if (is_null($user)) {
return null;
}
- return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $row['mount_id'], isset($row['path']) ? $row['path'] : '');
+ $mount_id = $row['mount_id'];
+ if (!is_null($mount_id)) {
+ $mount_id = (int) $mount_id;
+ }
+ return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $mount_id, isset($row['path']) ? $row['path'] : '');
}
/**