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

This commit is contained in:
Krishna Srinivas 2017-06-08 18:58:51 -07:00 committed by Harshavardhana
parent 0f5483f497
commit ec2920e981
2 changed files with 1 additions and 2 deletions

View File

@ -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) {

View File

@ -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")},