Skip to content

Commit

Permalink
No need to split between basename and extname
Browse files Browse the repository at this point in the history
  • Loading branch information
Coeur committed Jun 5, 2019
1 parent 864d6ce commit dc809be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/xcodeproj/project/object/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ def sort(options = nil)
end
end

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

0 comments on commit dc809be

Please sign in to comment.