diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-05 01:37:57 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-05 01:37:57 +0000 |
commit | bf39410402486a427642aea8e939c0c1f2aa31fd (patch) | |
tree | 9ae8a5c9cb81a6b4b05203c2313eb21c13c636ef /lib/redmine/thumbnail.rb | |
parent | a08c192606bc6780e76804e8817ede497d650c3f (diff) | |
download | redmine-bf39410402486a427642aea8e939c0c1f2aa31fd.tar.gz redmine-bf39410402486a427642aea8e939c0c1f2aa31fd.zip |
Merged r18126 from trunk to 3.4-stable (#31125).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@18128 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/thumbnail.rb')
-rw-r--r-- | lib/redmine/thumbnail.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/redmine/thumbnail.rb b/lib/redmine/thumbnail.rb index 5779551da..e4ae768fe 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 |