diff options
author | Dariusz Olszewski <starypatyk@users.noreply.github.com> | 2017-10-27 23:22:35 +0200 |
---|---|---|
committer | Dariusz Olszewski <starypatyk@users.noreply.github.com> | 2017-11-01 21:11:39 +0100 |
commit | 07016a1e5b19e56bb1c987b175a73b9dcd8ed692 (patch) | |
tree | 5a51014c850778d7cbd86e02382b3161f9a85f48 | |
parent | c2e82148e5b116cac8a5b0446d5e01ef92f2c23d (diff) | |
download | nextcloud-server-07016a1e5b19e56bb1c987b175a73b9dcd8ed692.tar.gz nextcloud-server-07016a1e5b19e56bb1c987b175a73b9dcd8ed692.zip |
Improve performance of UserMountCache with external storage folders
-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 9466aaf6c89..cf0ad9f1f2d 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -194,7 +194,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'] : ''); } /** |