diff options
author | Dariusz Olszewski <starypatyk@users.noreply.github.com> | 2017-10-27 23:22:35 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-11-09 10:07:27 +0100 |
commit | b9898c5b875cd4df30667cee8fe83576253081b7 (patch) | |
tree | 612cc55550257739a5e23cadac07bf803d595850 /lib/private/Files | |
parent | c91515cfedc678b9de24ae981573216478cddf27 (diff) | |
download | nextcloud-server-b9898c5b875cd4df30667cee8fe83576253081b7.tar.gz nextcloud-server-b9898c5b875cd4df30667cee8fe83576253081b7.zip |
Improve performance of UserMountCache with external storage folders
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Config/UserMountCache.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 6ec78e4d81c..5829fdf512c 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -193,7 +193,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']:''); } /** |