From 9c86574acfc3bd893e65572bdcbb831bf0a1530a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 13 Mar 2015 09:45:53 +0100 Subject: [PATCH] Only do all the "find path" magic when we need to register them --- lib/private/previewmanager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/previewmanager.php b/lib/private/previewmanager.php index 9f83d88a1fe..59d832cfbd7 100644 --- a/lib/private/previewmanager.php +++ b/lib/private/previewmanager.php @@ -31,7 +31,11 @@ class PreviewManager implements IPreview { */ public function __construct(\OCP\IConfig $config) { $this->config = $config; - $this->registerCoreProviders(); + + if ($this->config->getSystemValue('enable_previews', true)) { + // Register the default providers like txt, image, ... + $this->registerCoreProviders(); + } } /** -- 2.39.5