Allow "minio server ." to start minio in fs mode (#4513)

master
Krishna Srinivas 8 years ago committed by Harshavardhana
parent 0f5483f497
commit ec2920e981
  1. 2
      cmd/endpoint.go
  2. 1
      cmd/endpoint_test.go

@ -80,7 +80,7 @@ func (endpoint Endpoint) SetHTTP() {
func NewEndpoint(arg string) (Endpoint, error) {
// isEmptyPath - check whether given path is not empty.
isEmptyPath := func(path string) bool {
return path == "" || path == "." || path == "/" || path == `\`
return path == "" || path == "/" || path == `\`
}
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://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")},
{"c://foo", Endpoint{}, -1, fmt.Errorf("invalid URL endpoint format")},

Loading…
Cancel
Save