From 21d41ad7fd43a5962c21a5df865d37e6865a7516 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Mon, 24 Oct 2016 20:56:28 +0530 Subject: [PATCH] init[windows]: Fix to handle the case when export path is a relative path. (#3054) ex. to handle "minio server export" --- cmd/server-main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/server-main.go b/cmd/server-main.go index ba51ab19b..7a37390b0 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -144,8 +144,8 @@ func (ep storageEndPoint) presentIn(eps []storageEndPoint) bool { // Parse end-point (of the form host:port:path or host:path or path) func parseStorageEndPoint(ep string, defaultPort int) (storageEndPoint, error) { if runtime.GOOS == "windows" { - // Try to match path, ex. C:\export - matched, err := regexp.MatchString(`^[a-zA-Z]:\\[^:]+$`, ep) + // Try to match path, ex. C:\export or export + matched, err := regexp.MatchString(`^([a-zA-Z]:\\[^:]+|[^:]+)$`, ep) if err != nil { return storageEndPoint{}, err }