whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Don't allow null tool
Date Tue, 30 Oct 2018 18:17:41 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 4deed29  Don't allow null tool
4deed29 is described below

commit 4deed29a57c0928cc1c0bee48eed1cf611e36d1d
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Oct 30 18:17:38 2018 +0000

    Don't allow null tool
---
 www/secretary/workbench/views/actions/rotate-attachment.json.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/secretary/workbench/views/actions/rotate-attachment.json.rb b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
index 4fffd24..2a45834 100644
--- a/www/secretary/workbench/views/actions/rotate-attachment.json.rb
+++ b/www/secretary/workbench/views/actions/rotate-attachment.json.rb
@@ -11,6 +11,8 @@ begin
   tool = 'pdf90' if @direction.include? 'left'
   tool = 'pdf180' if @direction.include? 'flip'
 
+  raise "Invalid direction #{@direction}" unless tool
+
   Dir.chdir File.dirname(selected.path) do
     Kernel.system tool, '--quiet', '--suffix', 'rotated', selected.path
   end


Mime
View raw message