summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/unknown.php
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2013-09-25 10:39:15 +0200
committerMorris Jobke <morris.jobke@gmail.com>2013-10-07 13:19:21 +0200
commit8a35d79a39e06229859f13d141215b443f76baa7 (patch)
treed1b2c61d0b9d0facf2a5b453a82036d88d96497e /lib/private/preview/unknown.php
parentf81053072ffcbb0346f9a7cebb1585718df0f6f0 (diff)
downloadnextcloud-server-8a35d79a39e06229859f13d141215b443f76baa7.tar.gz
nextcloud-server-8a35d79a39e06229859f13d141215b443f76baa7.zip
check if svg of filetype icon exists
Diffstat (limited to 'lib/private/preview/unknown.php')
-rw-r--r--lib/private/preview/unknown.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/preview/unknown.php b/lib/private/preview/unknown.php
index 59667a77523..722bb727f57 100644
--- a/lib/private/preview/unknown.php
+++ b/lib/private/preview/unknown.php
@@ -20,9 +20,9 @@ class Unknown extends Provider {
$path = \OC_Helper::mimetypeIcon($mimetype);
$path = \OC::$SERVERROOT . substr($path, strlen(\OC::$WEBROOT));
- if (extension_loaded('imagick')) {
- $path = substr_replace($path, 'svg', -3);
+ $svgPath = substr_replace($path, 'svg', -3);
+ if (extension_loaded('imagick') && file_exists($svgPath)) {
$svg = new \Imagick();
$svg->setBackgroundColor(new \ImagickPixel('transparent'));
$svg->readImage($path);