Fix error checking

This commit is contained in:
Lorenzo Bolla
2021-10-08 14:28:18 +02:00
parent 8925949be3
commit 4c54f967b7

View File

@@ -142,7 +142,7 @@ Loop:
}
}
err = resp.Err()
if err != nil && errors.Is(err, grab.ErrBadChecksum) && ignoreMismatch {
if err != nil && err == grab.ErrBadChecksum && ignoreMismatch {
fmt.Printf("Ignoring checksum mismatch for %s\n", url)
return nil
}