You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/11/30 17:09:24 UTC

[whimsy] branch master updated: Get matching file names via ASF::ICLAFiles library routine

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 5e254b6  Get matching file names via ASF::ICLAFiles library routine
5e254b6 is described below

commit 5e254b6c909ac9d4a549367ab485d2ba8f4056eb
Author: Sebb <se...@apache.org>
AuthorDate: Sat Nov 30 17:09:09 2019 +0000

    Get matching file names via ASF::ICLAFiles library routine
---
 www/secretary/workbench/views/actions/icla2.json.rb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/www/secretary/workbench/views/actions/icla2.json.rb b/www/secretary/workbench/views/actions/icla2.json.rb
index 0157a3f..899eeba 100644
--- a/www/secretary/workbench/views/actions/icla2.json.rb
+++ b/www/secretary/workbench/views/actions/icla2.json.rb
@@ -22,12 +22,11 @@ _personalize_email(env.user)
 #                        move existing document                        #
 ########################################################################
 
-svndir = ASF::SVN['iclas'].untaint
 @filename.untaint if @filename =~ /\A\w[-.\w]*\z/
 
-if not Dir.exist? "#{svndir}/#@filename"
+if not ASF::ICLAFiles.Dir? @filename
   # Assumes there is a single matching file
-  @existing = File.basename(Dir["#{svndir}/#@filename.*"].first)
+  @existing = ASF::ICLAFiles.matchStem(@filename).first
   task "svn mv #@existing #@filename/icla#{File.extname(@existing)}" do
     form do
       _input value: @existing, name: 'existing'