Stop flooding the log, when previews are disabled

This commit is contained in:
Joas Schilling 2014-12-03 12:52:42 +01:00
parent 8c8c257ce3
commit 69a5a0c1a0
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class Preview {
self::initProviders();
}
if (empty(self::$providers)) {
if (empty(self::$providers) && \OC::$server->getConfig()->getSystemValue('enable_previews', true)) {
\OC_Log::write('core', 'No preview providers exist', \OC_Log::ERROR);
throw new \Exception('No preview providers');
}