From 5b103744c8b480a47a8973079280b3cc078714f2 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 16 Aug 2018 10:45:51 +0200 Subject: Check if a preview provider is available before using it Else if a preview provider is registerd but not available (for example missing support in some external lib). It will do :boom:. This way the providers can at least do the sanity checks required. Signed-off-by: Roeland Jago Douma --- lib/private/Preview/Generator.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index 3e81004c8aa..86579e3480b 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -184,6 +184,10 @@ class Generator { continue; } + if (!$provider->isAvailable($file)) { + continue; + } + $maxWidth = (int)$this->config->getSystemValue('preview_max_x', 4096); $maxHeight = (int)$this->config->getSystemValue('preview_max_y', 4096); -- cgit v1.2.3