mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Prevent the OpenDocument preview generator from trying to open empty files.
Rationale: does not make sense, and triggers a deprecation error in \ZipArchive. Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
This commit is contained in:
parent
e63720b714
commit
b3d8363327
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue