diff options
Diffstat (limited to 'lib/private/Preview/Bundled.php')
-rw-r--r-- | lib/private/Preview/Bundled.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php index df7f630dff7..812385c1672 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -31,6 +31,11 @@ use OCP\IImage; */ abstract class Bundled extends ProviderV2 { protected function extractThumbnail(File $file, string $path): ?IImage { + + if ($file->getSize() == 0) { + return null; + } + $sourceTmp = \OC::$server->getTempManager()->getTemporaryFile(); $targetTmp = \OC::$server->getTempManager()->getTemporaryFile(); $this->tmpFiles[] = $sourceTmp; |