This commit is contained in:
Noah 2020-06-24 16:02:53 -07:00
parent ebfed7ddba
commit df6956e419

View File

@ -34,6 +34,7 @@ func BestIcon(i Insights) (image.Image, error) {
w := icon.Width()
if w > maxSize && icon.Data != nil {
biggest = icon.Data
maxSize = w
}
}
@ -86,7 +87,7 @@ func IcoToPNG(r io.Reader) ([]image.Image, error) {
return result, fmt.Errorf("TempDir: %s", err)
}
log.Printf("Temp dir to extract .ico file: %s", dir)
// defer os.RemoveAll(dir)
defer os.RemoveAll(dir)
// Write the .ico binary to the source file.
icoFile := filepath.Join(dir, "favicon.ico")