mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
Log an error when calculating the binary checksum failed (#20454)
This commit is contained in:
parent
48a591e9b4
commit
e1c2344591
@ -184,10 +184,13 @@ var binaryChecksum = getBinaryChecksum()
|
||||
func getBinaryChecksum() string {
|
||||
mw := md5.New()
|
||||
b, err := os.Open(os.Args[0])
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
logger.Error("Calculating checksum failed: %s", err)
|
||||
return "00000000000000000000000000000000"
|
||||
}
|
||||
|
||||
defer b.Close()
|
||||
io.Copy(mw, b)
|
||||
}
|
||||
return hex.EncodeToString(mw.Sum(nil))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user