# and Mrs. Pollifax volume 6, On the China Station, is
# .../DorothyGilman/P06_On_the_China_Station.epub.
-require './book'
+require 'book'
class WalkDir
def initialize(root)
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)