Browse Source

Merge pull request #37772 from nextcloud/enh/30986/follow-up

Prevent the OpenDocument preview generator from trying to open empty files
pull/37791/head
Simon L 3 years ago
committed by GitHub
parent
commit
8508865eaf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/private/Preview/Bundled.php

4
lib/private/Preview/Bundled.php

@ -31,6 +31,10 @@ 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;

Loading…
Cancel
Save