summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-05-05 01:37:23 +0000
committerGo MAEDA <maeda@farend.jp>2019-05-05 01:37:23 +0000
commit3a206e7ba11092b525cf5e79bb4f7d202005cf03 (patch)
tree545aa104d78d2f9f1b2d6aee3108397cb3ef8e8f /lib
parent5b5298bac05ac272d6aafee73990d6b098c35bce (diff)
downloadredmine-3a206e7ba11092b525cf5e79bb4f7d202005cf03.tar.gz
redmine-3a206e7ba11092b525cf5e79bb4f7d202005cf03.zip
Merged r18126 from trunk to 4.0-stable (#31125).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@18127 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/thumbnail.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/redmine/thumbnail.rb b/lib/redmine/thumbnail.rb
index ab3c4f1bf..0ced54208 100644
--- a/lib/redmine/thumbnail.rb
+++ b/lib/redmine/thumbnail.rb
@@ -49,7 +49,12 @@ module Redmine
def self.convert_available?
return @convert_available if defined?(@convert_available)
- @convert_available = system("#{shell_quote CONVERT_BIN} -version") rescue false
+ begin
+ `#{shell_quote CONVERT_BIN} -version`
+ @convert_available = $?.success?
+ rescue
+ @convert_available = false
+ end
logger.warn("Imagemagick's convert binary (#{CONVERT_BIN}) not available") unless @convert_available
@convert_available
end