Skip to content

Commit

Permalink
use rm_rf
Browse files Browse the repository at this point in the history
  • Loading branch information
skoji committed Apr 27, 2024
1 parent 6dd633e commit 07e8d72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/gepub/book.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ def self.parse(io)
package = nil
package_path = nil
book = nil
Zip::File.open_buffer(io) {
Zip::File.open_buffer(io) do
|zip_file|
package, package_path = parse_container(zip_file, files)
check_consistency_of_package(package, package_path)
parse_files_into_package(files, package)
book = Book.new(package.path)
book.instance_eval { @package = package; @optional_files = files }
}
end
book
end

Expand Down
3 changes: 2 additions & 1 deletion spec/gepub_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
end

after do
FileUtils.remove_entry_secure @tempdir
# workaround; rubyzip opened files could not be deleted with remove_entry_secure on windows.
FileUtils.rm_rf @tempdir
end

it "should have title" do
Expand Down

0 comments on commit 07e8d72

Please sign in to comment.