diff options
author | Go MAEDA <maeda@farend.jp> | 2020-04-20 14:15:18 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-04-20 14:15:18 +0000 |
commit | 55b90245696b12702044d8465cde5acd9f4e85f0 (patch) | |
tree | 380c0203b62f82f0d003861c5ae6994da5d20832 /lib/redmine/thumbnail.rb | |
parent | 0421636cd7622d9b1716451debd3d84ff0c34ac8 (diff) | |
download | redmine-55b90245696b12702044d8465cde5acd9f4e85f0.tar.gz redmine-55b90245696b12702044d8465cde5acd9f4e85f0.zip |
Fix that thumbnail support for PDF attachments may not be detected (#33283).
Patch by VVD VVD.
git-svn-id: http://svn.redmine.org/redmine/trunk@19712 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/thumbnail.rb')
-rw-r--r-- | lib/redmine/thumbnail.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine/thumbnail.rb b/lib/redmine/thumbnail.rb index e9fe55188..b3507ba68 100644 --- a/lib/redmine/thumbnail.rb +++ b/lib/redmine/thumbnail.rb @@ -25,6 +25,7 @@ module Redmine extend Redmine::Utils::Shell CONVERT_BIN = (Redmine::Configuration['imagemagick_convert_command'] || 'convert').freeze + GS_BIN = (Redmine::Configuration['gs_command'] || 'gs').freeze ALLOWED_TYPES = %w(image/bmp image/gif image/jpeg image/png application/pdf) # Generates a thumbnail for the source image to target @@ -79,12 +80,13 @@ module Redmine @gs_available = false else begin - `gs -version` + `#{shell_quote GS_BIN} -version` @gs_available = $?.success? rescue @gs_available = false end end + logger.warn("gs binary (#{GS_BIN}) not available") unless @gs_available @gs_available end |