lib/app_info/apk.rb in app-info-2.1.2 vs lib/app_info/apk.rb in app-info-2.1.3
- old
+ new
@@ -119,12 +119,10 @@
@icons = @apk.icon.each_with_object([]) do |(path, data), obj|
icon_name = File.basename(path)
icon_path = File.join(tmp_path, File.dirname(path))
icon_file = File.join(icon_path, icon_name)
FileUtils.mkdir_p icon_path
- File.open(icon_file, 'w') do |f|
- f.write(data.force_encoding('BINARY'))
- end
+ File.open(icon_file, 'wb') { |f| f.write(data) }
obj << {
name: icon_name,
file: icon_file,
dimensions: ImageSize.path(icon_file).size