aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/AppData/AppData.php2
-rw-r--r--lib/private/Preview/BackgroundCleanupJob.php1
-rw-r--r--lib/private/Preview/Storage/Root.php4
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/AppData/AppData.php b/lib/private/Files/AppData/AppData.php
index df72978a142..53f69be7127 100644
--- a/lib/private/Files/AppData/AppData.php
+++ b/lib/private/Files/AppData/AppData.php
@@ -79,7 +79,7 @@ class AppData implements IAppData {
return 'appdata_' . $instanceId;
}
- private function getAppDataRootFolder(): Folder {
+ protected function getAppDataRootFolder(): Folder {
$name = $this->getAppDataFolderName();
try {
diff --git a/lib/private/Preview/BackgroundCleanupJob.php b/lib/private/Preview/BackgroundCleanupJob.php
index c78ef7d7257..ab40aeaaa79 100644
--- a/lib/private/Preview/BackgroundCleanupJob.php
+++ b/lib/private/Preview/BackgroundCleanupJob.php
@@ -134,6 +134,7 @@ class BackgroundCleanupJob extends TimedJob {
))
->where(
$qb->expr()->andX(
+ $qb->expr()->eq('a.storage', $qb->createNamedParameter($this->previewFolder->getStorageId())),
$qb->expr()->isNull('b.fileid'),
$qb->expr()->like('a.path', $qb->createNamedParameter($like)),
$qb->expr()->eq('a.mimetype', $qb->createNamedParameter($this->mimeTypeLoader->getId('httpd/unix-directory')))
diff --git a/lib/private/Preview/Storage/Root.php b/lib/private/Preview/Storage/Root.php
index 0eac3ce2064..c4191228ec7 100644
--- a/lib/private/Preview/Storage/Root.php
+++ b/lib/private/Preview/Storage/Root.php
@@ -85,4 +85,8 @@ class Root extends AppData {
public static function getInternalFolder(string $name): string {
return implode('/', str_split(substr(md5($name), 0, 7))) . '/' . $name;
}
+
+ public function getStorageId(): int {
+ return $this->getAppDataRootFolder()->getStorage()->getCache()->getNumericStorageId();
+ }
}