Skip to content

Commit 19069f2

Browse files
authored
Merge pull request #6988 from starypatyk/stable12-mount-cache-performance
Improve performance of UserMountCache with external storage folders
2 parents 469db9f + 07016a1 commit 19069f2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/private/Files/Config/UserMountCache.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ private function dbRowToMountInfo(array $row) {
195195
if (is_null($user)) {
196196
return null;
197197
}
198-
return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $row['mount_id'], isset($row['path']) ? $row['path'] : '');
198+
$mount_id = $row['mount_id'];
199+
if (!is_null($mount_id)) {
200+
$mount_id = (int) $mount_id;
201+
}
202+
return new CachedMountInfo($user, (int)$row['storage_id'], (int)$row['root_id'], $row['mount_point'], $mount_id, isset($row['path']) ? $row['path'] : '');
199203
}
200204

201205
/**

0 commit comments

Comments
 (0)