diff --git a/lib/ceedling/file_path_collection_utils.rb b/lib/ceedling/file_path_collection_utils.rb index 7b68cfaa..ce71878c 100644 --- a/lib/ceedling/file_path_collection_utils.rb +++ b/lib/ceedling/file_path_collection_utils.rb @@ -84,7 +84,7 @@ def collect_paths(paths) (Pathname.new( path ).relative_path_from( @working_dir_path )).to_s() end - return paths.sort() + return paths end @@ -110,8 +110,7 @@ def revise_filelist(list, revisions) filepaths = [] # Expand path by pattern as needed and add only filepaths to working list - # Note: `sort()` becuase of Github Issue #860 - @file_wrapper.directory_listing( path ).sort.each do |entry| + @file_wrapper.directory_listing( path ).each do |entry| filepaths << File.expand_path( entry ) if !@file_wrapper.directory?( entry ) end diff --git a/lib/ceedling/file_wrapper.rb b/lib/ceedling/file_wrapper.rb index 3872aa83..12326e9f 100644 --- a/lib/ceedling/file_wrapper.rb +++ b/lib/ceedling/file_wrapper.rb @@ -46,7 +46,9 @@ def dirname(path) end def directory_listing(glob) - return Dir.glob(glob, File::FNM_PATHNAME) # Case insensitive globs + # Note: `sort()` to ensure platform-independent directory listings (Github Issue #860) + # FNM_PATHNAME => Case insensitive globs + return Dir.glob(glob, File::FNM_PATHNAME).sort() end def rm_f(filepath, options={})