Simplify zip extracting code

This commit is contained in:
Toks
2014-10-17 11:30:27 -04:00
committed by r888888888
parent 230a5ad37e
commit b3dbd0be4c

View File

@@ -10,10 +10,7 @@ class PixivUgoiraConverter
FileUtils.mkdir_p("#{tmpdir}/images")
folder.each_with_index do |file, i|
path = File.join(tmpdir, "images", file.name)
image_blob = file.get_input_stream {|is| is.read}
File.open(path, "wb") do |f|
f.write(image_blob)
end
file.extract(path)
end
# Duplicate last frame to avoid it being displayed only for a very short amount of time.