summaryrefslogtreecommitdiffstats
path: root/core/ajax
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-07-30 16:29:18 +0200
committerRobin Appelman <icewind@owncloud.com>2014-07-30 16:31:37 +0200
commit4a9b0d5465927b0b4cc856cebbc724264ffdd404 (patch)
tree2203c4dd985bebc76fd92b3237f6f72c3d8f7077 /core/ajax
parent2946a63f6bbcf298a30bb89ed72dbb650bc39def (diff)
downloadnextcloud-server-4a9b0d5465927b0b4cc856cebbc724264ffdd404.tar.gz
nextcloud-server-4a9b0d5465927b0b4cc856cebbc724264ffdd404.zip
Use svg mimeicons for empty text files
Diffstat (limited to 'core/ajax')
-rw-r--r--core/ajax/preview.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index d38043707ac..a08f1563b0a 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -34,7 +34,8 @@ if ($maxX === 0 || $maxY === 0) {
try {
$preview = new \OC\Preview(\OC_User::getUser(), 'files');
- if (!$always and !$preview->isMimeSupported(\OC\Files\Filesystem::getMimeType($file))) {
+ $info = \OC\Files\Filesystem::getFileInfo($file);
+ if (!$always and !$preview->isAvailable($info)) {
\OC_Response::setStatus(404);
} else {
$preview->setFile($file);