From ec2920e9811484525c0e52a377774086d25382d7 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Thu, 8 Jun 2017 18:58:51 -0700 Subject: [PATCH] Allow "minio server ." to start minio in fs mode (#4513) --- cmd/endpoint.go | 2 +- cmd/endpoint_test.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/endpoint.go b/cmd/endpoint.go index 30af75657..c42160efa 100644 --- a/cmd/endpoint.go +++ b/cmd/endpoint.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) { diff --git a/cmd/endpoint_test.go b/cmd/endpoint_test.go index 49736bd66..c01fd7a6c 100644 --- a/cmd/endpoint_test.go +++ b/cmd/endpoint_test.go @@ -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")},