Skip to content

Commit

Permalink
Merge pull request CocoaPods#835 from igor-makarov/sort-fallback
Browse files Browse the repository at this point in the history
Add fallback to sort group by full path
  • Loading branch information
dnkoutso authored Jul 14, 2021
2 parents 4f2acfc + 01ac097 commit 2700820
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/xcodeproj/project/object/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,12 @@ def sort(options = nil)

result = File.basename(x.display_name.downcase, '.*') <=> File.basename(y.display_name.downcase, '.*')
if result.zero?
File.extname(x.display_name.downcase) <=> File.extname(y.display_name.downcase)
else
result
result = File.extname(x.display_name.downcase) <=> File.extname(y.display_name.downcase)
if result.zero?
result = x.path.downcase <=> y.path.downcase
end
end
result
end
end
end
Expand Down

0 comments on commit 2700820

Please sign in to comment.