summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Cache/Cache.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 2a58f796814..64cd2b25ee5 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -997,7 +997,8 @@ class Cache implements ICache {
->from('filecache')
->whereStorageId()
->andWhere($query->expr()->lt('size', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
- ->orderBy('fileid', 'DESC');
+ ->orderBy('fileid', 'DESC')
+ ->setMaxResults(1);
$result = $query->execute();
$path = $result->fetchColumn();