From 07770fce996ba1b0d6444cffb85ec23e2e46d505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 28 Feb 2022 15:40:33 +0100 Subject: [PATCH] Ignore errors when searching for bundled preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When an odt file is xml and not zip, it would throw a ValueError. It will now just ignore this file and return null for the preview. Signed-off-by: Côme Chilliet --- lib/private/Preview/Bundled.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php index f026d3259f514..6b5a8aa2d1214 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -46,7 +46,7 @@ protected function extractThumbnail(File $file, $path): ?IImage { $image->fixOrientation(); return $image; - } catch (\Exception $e) { + } catch (\Throwable $e) { return null; } }