Improve performance of UserMountCache with external storage folders

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Dariusz Olszewski 2017-10-27 23:22:35 +02:00 committed by Morris Jobke
parent c91515cfed
commit b9898c5b87
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 5 additions and 1 deletions

View File

@ -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']:'');
}
/**