From 50476239f6a3634712f1f945245e0d6cbf5bf3bd Mon Sep 17 00:00:00 2001 From: Inkeliz Date: Sun, 3 Oct 2021 13:45:08 +0100 Subject: [PATCH] cmd/gogio: compile when no icon is found Signed-off-by: Inkeliz --- cmd/gogio/windowsbuild.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/gogio/windowsbuild.go b/cmd/gogio/windowsbuild.go index 1af86681..23cdd517 100644 --- a/cmd/gogio/windowsbuild.go +++ b/cmd/gogio/windowsbuild.go @@ -3,6 +3,7 @@ package main import ( "bytes" "encoding/binary" + "errors" "fmt" "image/png" "io" @@ -119,6 +120,9 @@ func (b *bufferCoff) Size() int64 { func (b *windowsBuilder) embedIcon(path string) (err error) { iconFile, err := os.Open(path) if err != nil { + if errors.Is(err, os.ErrNotExist) { + return nil + } return fmt.Errorf("can't read the icon located at %s: %v", path, err) } defer iconFile.Close()