ensure order is preserved

This commit is contained in:
Nick Sellen 2013-01-31 11:44:38 +00:00
parent 7051bdb1f5
commit 4f6b5001b4

View File

@ -22,7 +22,7 @@ module Manual
def self.traverse(path, directory_sort = false, paths = [], key_paths = [], &block)
entries = Dir.glob(File.join(path,'*'))
entries = Dir.glob(File.join(path,'*')).sort
entries.sort_by! { |e| File.directory?(e) ? 1 : 0 } if directory_sort