lib/mangos/processor.rb in mangos-0.3 vs lib/mangos/processor.rb in mangos-0.4

- old
+ new

@@ -7,12 +7,19 @@ def create(path) Mangos::Book.new.tap { |book| Mangos::BookUpdater.new(@package, book, path).update } end def update(path, book) - return false if !@package.force? && path.mtime < @original_mtime + return false if !update?(path, book) Mangos::BookUpdater.new(@package, book, path).update true + end + + def update?(path, book) + return true if @package.force? + return true if path.mtime >= @original_mtime + return true if book.pages == 0 + false end def delete(book) end end \ No newline at end of file