lib/alexandria/smart_library.rb in alexandria-book-collection-manager-0.7.9 vs lib/alexandria/smart_library.rb in alexandria-book-collection-manager-0.7.10

- old
+ new

@@ -146,11 +146,11 @@ def save(book = nil) if book @cache[book].save(book) else - FileUtils.mkdir_p(base_dir) unless File.exist? base_dir + FileUtils.mkdir_p(base_dir) File.open(yaml, "w") { |io| io.puts to_hash.to_yaml } end end def save_cover(book, _cover_uri) @@ -160,10 +160,10 @@ def final_cover(book) @cache[book].final_cover(book) end def copy_covers(somewhere) - FileUtils.rm_rf(somewhere) if File.exist?(somewhere) + FileUtils.rm_rf(somewhere) FileUtils.mkdir(somewhere) each do |book| library = @cache[book] next unless File.exist?(library.cover(book))