From 482274e20eee57967bcde747879c0248bf7ef760 Mon Sep 17 00:00:00 2001 From: Henrik Nygren Date: Wed, 21 Feb 2024 11:01:28 +0200 Subject: [PATCH] Use case insensitive matching for file extensions for submission files --- app/models/source_file_list.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/source_file_list.rb b/app/models/source_file_list.rb index 377288bba..0d5900bef 100644 --- a/app/models/source_file_list.rb +++ b/app/models/source_file_list.rb @@ -118,7 +118,7 @@ def self.find_all_files_under(root_dir) def self.source_file?(file) return false unless file.file? dir = file.parent.to_s - name = file.basename.to_s + name = file.basename.to_s.downcase name.end_with?('.java', '.jsp') || (name.end_with?('.xml') && name != 'build.xml' && name != 'pom.xml' && name != 'nbactions.xml' && !name.end_with?('checkstyle.xml')) || name.end_with?('.properties') || @@ -134,7 +134,7 @@ def self.source_file?(file) name.end_with?('.hpp') || name.end_with?('.h') || name.end_with?('.rb') || - (dir.include?('/R') && name.end_with?('.R')) || + (dir.include?('/R') && name.end_with?('.r')) || (dir.include?('/src') && name.end_with?('.py')) || dir.include?('/WEB-INF') || name.end_with?('.cs')