Fix error reading zip
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class PixivUgoiraConverter
|
||||
def convert(source_path, output_path, preview_path, frame_data)
|
||||
folder = unpack(File.open(source_path))
|
||||
folder = Zip::File.new(source_path)
|
||||
write_webm(folder, output_path, frame_data)
|
||||
write_preview(folder, preview_path)
|
||||
end
|
||||
@@ -50,10 +50,4 @@ class PixivUgoiraConverter
|
||||
image = Magick::Image.from_blob(image_blob).first
|
||||
image.write(path)
|
||||
end
|
||||
|
||||
def unpack(zip_file)
|
||||
folder = Zip::CentralDirectory.new
|
||||
folder.read_from_stream(zip_file)
|
||||
folder
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user