mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
Allow "minio server ." to start minio in fs mode (#4513)
This commit is contained in:
parent
0f5483f497
commit
ec2920e981
@ -80,7 +80,7 @@ func (endpoint Endpoint) SetHTTP() {
|
|||||||
func NewEndpoint(arg string) (Endpoint, error) {
|
func NewEndpoint(arg string) (Endpoint, error) {
|
||||||
// isEmptyPath - check whether given path is not empty.
|
// isEmptyPath - check whether given path is not empty.
|
||||||
isEmptyPath := func(path string) bool {
|
isEmptyPath := func(path string) bool {
|
||||||
return path == "" || path == "." || path == "/" || path == `\`
|
return path == "" || path == "/" || path == `\`
|
||||||
}
|
}
|
||||||
|
|
||||||
if isEmptyPath(arg) {
|
if isEmptyPath(arg) {
|
||||||
|
@ -62,7 +62,6 @@ func TestNewEndpoint(t *testing.T) {
|
|||||||
{"http://127.0.0.1:8080/path", Endpoint{URL: u3, IsLocal: true}, URLEndpointType, nil},
|
{"http://127.0.0.1:8080/path", Endpoint{URL: u3, IsLocal: true}, URLEndpointType, nil},
|
||||||
{"http://192.168.253.200/path", Endpoint{URL: u4}, URLEndpointType, nil},
|
{"http://192.168.253.200/path", Endpoint{URL: u4}, URLEndpointType, nil},
|
||||||
{"", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
{"", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
||||||
{".", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
|
||||||
{"/", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
{"/", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
||||||
{`\`, Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
{`\`, Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")},
|
||||||
{"c://foo", Endpoint{}, -1, fmt.Errorf("invalid URL endpoint format")},
|
{"c://foo", Endpoint{}, -1, fmt.Errorf("invalid URL endpoint format")},
|
||||||
|
Loading…
Reference in New Issue
Block a user