mirror of
https://github.com/minio/minio.git
synced 2025-01-27 06:33:18 -05:00
Fix checksum error during startup when minio
is loaded via PATH
environment variable (#20509)
This commit is contained in:
parent
0abfd1bcb1
commit
e5b18df6db
@ -978,7 +978,7 @@ var errorCodes = errorCodeMap{
|
|||||||
},
|
},
|
||||||
ErrReplicationNoExistingObjects: {
|
ErrReplicationNoExistingObjects: {
|
||||||
Code: "XMinioReplicationNoExistingObjects",
|
Code: "XMinioReplicationNoExistingObjects",
|
||||||
Description: "No matching ExistingsObjects rule enabled",
|
Description: "No matching ExistingObjects rule enabled",
|
||||||
HTTPStatusCode: http.StatusBadRequest,
|
HTTPStatusCode: http.StatusBadRequest,
|
||||||
},
|
},
|
||||||
ErrRemoteTargetDenyAddError: {
|
ErrRemoteTargetDenyAddError: {
|
||||||
|
@ -26,7 +26,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -184,7 +183,7 @@ var binaryChecksum = getBinaryChecksum()
|
|||||||
|
|
||||||
func getBinaryChecksum() string {
|
func getBinaryChecksum() string {
|
||||||
mw := md5.New()
|
mw := md5.New()
|
||||||
binPath, err := filepath.Abs(os.Args[0])
|
binPath, err := os.Executable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("Calculating checksum failed: %s", err)
|
logger.Error("Calculating checksum failed: %s", err)
|
||||||
return "00000000000000000000000000000000"
|
return "00000000000000000000000000000000"
|
||||||
|
@ -1638,7 +1638,7 @@ func ExecObjectLayerAPIAnonTest(t *testing.T, obj ObjectLayer, testName, bucketN
|
|||||||
t.Fatal(failTestStr(anonTestStr, fmt.Sprintf("Object API Nil Test expected to fail with %d, but failed with %d", accessDenied, rec.Code)))
|
t.Fatal(failTestStr(anonTestStr, fmt.Sprintf("Object API Nil Test expected to fail with %d, but failed with %d", accessDenied, rec.Code)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// HEAD HTTTP request doesn't contain response body.
|
// HEAD HTTP request doesn't contain response body.
|
||||||
if anonReq.Method != http.MethodHead {
|
if anonReq.Method != http.MethodHead {
|
||||||
// read the response body.
|
// read the response body.
|
||||||
var actualContent []byte
|
var actualContent []byte
|
||||||
|
Loading…
x
Reference in New Issue
Block a user