diff --git a/lib/private/Preview/BackgroundCleanupJob.php b/lib/private/Preview/BackgroundCleanupJob.php index 49ff01486a3..deadcd007b1 100644 --- a/lib/private/Preview/BackgroundCleanupJob.php +++ b/lib/private/Preview/BackgroundCleanupJob.php @@ -72,6 +72,8 @@ class BackgroundCleanupJob extends TimedJob { )) ->where( $qb->expr()->isNull('b.fileid') + )->andWhere( + $qb->expr()->eq('a.storage', $qb->createNamedParameter($this->previewFolder->getStorageId())) )->andWhere( $qb->expr()->eq('a.parent', $qb->createNamedParameter($this->previewFolder->getId())) )->andWhere(