Skip to content

Commit

Permalink
use rm_rf instead of remove_entry_secure
Browse files Browse the repository at this point in the history
  • Loading branch information
skoji committed Apr 27, 2024
1 parent 6dd633e commit c5d1e3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/gepub/book.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,15 @@ 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
2 changes: 1 addition & 1 deletion spec/gepub_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
end

after do
FileUtils.remove_entry_secure @tempdir
FileUtils.rm_rf @tempdir
end

it "should have title" do
Expand Down

0 comments on commit c5d1e3d

Please sign in to comment.