]> source.dussan.org Git - redmine.git/commitdiff
Merged r18126 from trunk to 3.4-stable (#31125).
authorGo MAEDA <maeda@farend.jp>
Sun, 5 May 2019 01:37:57 +0000 (01:37 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 5 May 2019 01:37:57 +0000 (01:37 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@18128 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/thumbnail.rb

index 5779551dac2c3a33f2d337bec4f10f0cfa9b413b..e4ae768feaa9271556eb7a383548392788af4c82 100644 (file)
@@ -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