Fix syso generation bug

This commit is contained in:
Lea O'Anthony 2024-08-16 21:08:02 +10:00
commit 96b97b25bf
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405

View file

@ -44,7 +44,7 @@ func GenerateSyso(options *SysoOptions) (err error) {
}
defer func() {
err2 := iconFile.Close()
if err2 != nil {
if err == nil && err2 != nil {
err = errors.Wrap(err, "error closing icon file: "+err2.Error())
}
}()