lib/sprockets/resolve.rb in sprockets-3.6.2 vs lib/sprockets/resolve.rb in sprockets-3.6.3

- old
+ new

@@ -58,10 +58,11 @@ load_path, _ = paths_split(config[:paths], options[:base_path]) message << " under '#{load_path}'" end message << " with type '#{options[:accept]}'" if options[:accept] + message << "\nChecked in these paths: \n #{ config[:paths].join("\n ") }" raise FileNotFound, message end return uri, deps @@ -175,9 +176,10 @@ def dirname_matches(dirname, basename) candidates = [] entries = self.entries(dirname) entries.each do |entry| + next unless File.basename(entry).start_with?(basename) name, type, _, _ = parse_path_extnames(entry) if basename == name candidates << [File.join(dirname, entry), type] end end