Commit fa7c9827 authored by Christopher Roach's avatar Christopher Roach

Updated `clean_paths` and `expand_paths` methods to use `File::FNM_CASEFOLD`

This change is an update to an earlier pull request to fix Issue
https://github.com/CocoaPods/CocoaPods/pull/572.
parent ca6cabc4
......@@ -166,10 +166,11 @@ module Pod
# @note The Paths are downcased to prevent issues. See #568.
#
def clean_paths
files = Dir.glob(root + "**/*", File::FNM_DOTMATCH)
used = used_files.map(&:downcase)
files = Dir.glob(root + "**/*", [File::FNM_DOTMATCH, File::FNM_CASEFOLD])
files.reject! do |candidate|
candidate.end_with?('.', '..') || used_files.any? do |path|
candidate.end_with?('.', '..') || used.any? do |path|
path.include?(candidate) || candidate.include?(path)
end
end
......@@ -535,7 +536,7 @@ module Pod
if pattern.directory? && options[:glob]
pattern += options[:glob]
end
Pathname.glob(pattern)
Pathname.glob(pattern, File::FNM_CASEFOLD)
end.flatten
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment