def books
result = []
- for file in @files
+ for file in @files.sort
if Book.canHandle?(file)
book = Book.new(file)
result.push(book)
children = Dir.entries(path)
for child in children
fullName = (path.chomp("/")) + "/" + child
- if (File.directory?(fullName)) and (child != ".") and (child != "..")
+ if (File.directory?(fullName)) and (child != ".") and (child != "..") and (!File.symlink?(fullName))
sub = walk(fullName)
if (sub != nil) and (sub.length > 0)
result.concat(sub)