lib/review/epubmaker.rb in review-5.6.0 vs lib/review/epubmaker.rb in review-5.7.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2010-2022 Kenshi Muto and Masayoshi Takahashi +# Copyright (c) 2010-2023 Kenshi Muto and Masayoshi Takahashi # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". @@ -104,12 +104,10 @@ end def build_path if @config['debug'] path = File.expand_path("#{@config['bookname']}-epub", Dir.pwd) - if File.exist?(path) - FileUtils.rm_rf(path, secure: true) - end + FileUtils.rm_rf(path, secure: true) Dir.mkdir(path) path else Dir.mktmpdir("#{@config['bookname']}-epub-") end