lib/epub/maker.rb in epub-maker-0.1.1 vs lib/epub/maker.rb in epub-maker-0.1.2

- old
+ new

@@ -74,10 +74,12 @@ epub_file ||= source_dir + ".epub" source_dir = Pathname(source_dir) raise "source directory #{source_dir} not exist" unless source_dir.exist? epub_file = Pathname(epub_file) - temp_dest = Pathname(Tempfile.create(epub_file.basename.to_path, epub_file.dirname.to_path)) + temp_dest_file = Tempfile.create(epub_file.basename.to_path, epub_file.dirname.to_path) + temp_dest_file.close + temp_dest = Pathname(temp_dest_file) Pathname.mktmpdir "epub-maker" do |dir| temp_container = dir/source_dir.basename temp_container.mkdir mimetype = temp_container/"mimetype"