aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Preview/Bundled.php2
-rw-r--r--lib/private/Preview/ProviderV2.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php
index 4da2486b76b..e0551bd392b 100644
--- a/lib/private/Preview/Bundled.php
+++ b/lib/private/Preview/Bundled.php
@@ -33,6 +33,8 @@ abstract class Bundled extends ProviderV2 {
protected function extractThumbnail(File $file, string $path): ?IImage {
$sourceTmp = \OC::$server->getTempManager()->getTemporaryFile();
$targetTmp = \OC::$server->getTempManager()->getTemporaryFile();
+ $this->tmpFiles[] = $sourceTmp;
+ $this->tmpFiles[] = $targetTmp;
try {
$content = $file->fopen('r');
diff --git a/lib/private/Preview/ProviderV2.php b/lib/private/Preview/ProviderV2.php
index 766e00f074a..0cb7eb59e21 100644
--- a/lib/private/Preview/ProviderV2.php
+++ b/lib/private/Preview/ProviderV2.php
@@ -35,7 +35,7 @@ abstract class ProviderV2 implements IProviderV2 {
protected $options;
/** @var array */
- private $tmpFiles = [];
+ protected $tmpFiles = [];
/**
* Constructor
@@ -109,7 +109,7 @@ abstract class ProviderV2 implements IProviderV2 {
/**
* Clean any generated temporary files
*/
- protected function cleanTmpFiles() {
+ protected function cleanTmpFiles(): void {
foreach ($this->tmpFiles as $tmpFile) {
unlink($tmpFile);
}