summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-10-31 13:07:14 +0000
committerGo MAEDA <maeda@farend.jp>2019-10-31 13:07:14 +0000
commit3ece374177451a37eb7c8a3d135aff60962cd387 (patch)
tree9a88021176eef265ed265949728029212f276aca /app
parent5d2960d36f9a84ae8d3c2d98edb0c0b95ab0b7ab (diff)
downloadredmine-3ece374177451a37eb7c8a3d135aff60962cd387.tar.gz
redmine-3ece374177451a37eb7c8a3d135aff60962cd387.zip
Don't try to generate thumbnails if convert command is not available (#32289).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18885 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/attachment.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 8304d4dea..627c1a181 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -201,7 +201,9 @@ class Attachment < ActiveRecord::Base
end
def thumbnailable?
- image? || (is_pdf? && Redmine::Thumbnail.gs_available?)
+ Redmine::Thumbnail.convert_available? && (
+ image? || (is_pdf? && Redmine::Thumbnail.gs_available?)
+ )
end
# Returns the full path the attachment thumbnail, or nil