summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2018-08-20 13:21:16 +0200
committerGitHub <noreply@github.com>2018-08-20 13:21:16 +0200
commit4b92a0986cb7c30265a39bf5baf0d6deebec8d8b (patch)
tree534fd83f115260fb6353ebea6815c46c1b773f4e /lib/private
parentc260e4403d2b54c56c50043d67490e2c1041f3b2 (diff)
parent5b103744c8b480a47a8973079280b3cc078714f2 (diff)
downloadnextcloud-server-4b92a0986cb7c30265a39bf5baf0d6deebec8d8b.tar.gz
nextcloud-server-4b92a0986cb7c30265a39bf5baf0d6deebec8d8b.zip
Merge pull request #10712 from nextcloud/fix/noid/check_if_provider_is_available_before_use
Check if a preview provider is available before using it
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Preview/Generator.php4
1 files changed, 4 insertions, 0 deletions
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);