Permalink
Browse files

[LocalPod] Fixing clean paths

The earlier fix for clean paths is forcing some directories to lower
case which could cause some side effects. This fix removes the
`File::FNM_CASEFOLD` flag from the call to `Dir.glob` and allows the
OS to treat the directories as they wish. This makes the paths
returned in the `clean_paths` method consistent with those returned in
the `expanded_paths` method.
  • Loading branch information...
1 parent fe96a97 commit ca6cabc4205f46a6b469ce50dd25ad0e52ab543b @croach committed Oct 4, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/cocoapods/local_pod.rb
@@ -166,11 +166,10 @@ def clean!
# @note The Paths are downcased to prevent issues. See #568.
#
def clean_paths
- used = used_files.map(&:downcase)
- files = Dir.glob(root + "**/*", File::FNM_DOTMATCH).map(&:downcase)
+ files = Dir.glob(root + "**/*", File::FNM_DOTMATCH)
files.reject! do |candidate|
- candidate.end_with?('.', '..') || used.any? do |path|
+ candidate.end_with?('.', '..') || used_files.any? do |path|
path.include?(candidate) || candidate.include?(path)
end
end
@@ -536,7 +535,7 @@ def expanded_paths(patterns, options = {})
if pattern.directory? && options[:glob]
pattern += options[:glob]
end
- Pathname.glob(pattern, File::FNM_CASEFOLD)
+ Pathname.glob(pattern)
end.flatten
end

0 comments on commit ca6cabc

Please sign in to comment.