Only do all the "find path" magic when we need to register them

This commit is contained in:
Joas Schilling 2015-03-13 09:45:53 +01:00
parent e38dea3542
commit 9c86574acf

View file

@ -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();
}
}
/**