ensure order is preserved
This commit is contained in:
parent
7051bdb1f5
commit
4f6b5001b4
@ -22,7 +22,7 @@ module Manual
|
|||||||
|
|
||||||
def self.traverse(path, directory_sort = false, paths = [], key_paths = [], &block)
|
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
|
entries.sort_by! { |e| File.directory?(e) ? 1 : 0 } if directory_sort
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user