mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #37772 from nextcloud/enh/30986/follow-up
Prevent the OpenDocument preview generator from trying to open empty files
This commit is contained in:
commit
8508865eaf
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue