diff options
author | Go MAEDA <maeda@farend.jp> | 2020-04-20 14:16:31 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-04-20 14:16:31 +0000 |
commit | 7ac73fa6f41862e9d819cdb71dd7bb95c5f59715 (patch) | |
tree | 315a9417532465a406cc75d76160bb4530f7175c /lib/redmine/thumbnail.rb | |
parent | 8eeafcdd5ec0690cb8ce15addc3ec16721b1874e (diff) | |
download | redmine-7ac73fa6f41862e9d819cdb71dd7bb95c5f59715.tar.gz redmine-7ac73fa6f41862e9d819cdb71dd7bb95c5f59715.zip |
Merged r19712 from trunk to 4.1-stable (#33283).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19713 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 79f784393..cc9656b3e 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 |