mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
init[windows]: Fix to handle the case when export path is a relative path. (#3054)
ex. to handle "minio server export"
This commit is contained in:
parent
fe56220d1a
commit
21d41ad7fd
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user