diff --git a/lib/xcodeproj/project/object/group.rb b/lib/xcodeproj/project/object/group.rb index 4eebcc14..18d16d4d 100644 --- a/lib/xcodeproj/project/object/group.rb +++ b/lib/xcodeproj/project/object/group.rb @@ -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