whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: downcase extension on write, and check against downcased extension
Date Thu, 11 May 2017 00:49:56 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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  786413d   downcase extension on write, and check against downcased extension
786413d is described below

commit 786413d74a2515f91916225d929705b7b5c08811
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Wed May 10 20:49:26 2017 -0400

    downcase extension on write, and check against downcased extension
---
 www/secretary/workbench/models/message.rb          | 2 +-
 www/secretary/workbench/views/actions/icla.json.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/models/message.rb b/www/secretary/workbench/models/message.rb
index 1c42a50..f6c42df 100644
--- a/www/secretary/workbench/models/message.rb
+++ b/www/secretary/workbench/models/message.rb
@@ -173,7 +173,7 @@ class Message
     attachments += attachments.pop.to_a if Hash === attachments.last
 
     if attachments.flatten.length == 1
-      ext = File.extname(attachments.first).untaint
+      ext = File.extname(attachments.first).downcase.untaint
       find(attachments.first).write_svn(repos, filename + ext)
     else
       # validate filename
diff --git a/www/secretary/workbench/views/actions/icla.json.rb b/www/secretary/workbench/views/actions/icla.json.rb
index 0b0d087..dec3e6d 100644
--- a/www/secretary/workbench/views/actions/icla.json.rb
+++ b/www/secretary/workbench/views/actions/icla.json.rb
@@ -47,7 +47,7 @@ task "svn commit documents/iclas/#@filename#{fileext}" do
       'https://svn.apache.org/repos/private/documents/iclas', "#{dir}/iclas"
 
     # create/add file(s)
-    if @signature.to_s.empty? or not @selected.end_with? '.pdf'
+    if @signature.to_s.empty? or fileext != '.pdf'
       message.write_svn("#{dir}/iclas", @filename, @selected, @signature)
     else
       message.write_svn("#{dir}/iclas", @filename, 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message