mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 05:30:24 +03:00
Use const slashSeparator instead of "/" everywhere (#8028)
This commit is contained in:
+2
-2
@@ -100,7 +100,7 @@ func (endpoint *Endpoint) UpdateIsLocal() error {
|
||||
func NewEndpoint(arg string) (ep Endpoint, e error) {
|
||||
// isEmptyPath - check whether given path is not empty.
|
||||
isEmptyPath := func(path string) bool {
|
||||
return path == "" || path == "/" || path == `\`
|
||||
return path == "" || path == SlashSeparator || path == `\`
|
||||
}
|
||||
|
||||
if isEmptyPath(arg) {
|
||||
@@ -152,7 +152,7 @@ func NewEndpoint(arg string) (ep Endpoint, e error) {
|
||||
return ep, fmt.Errorf("empty or root path is not supported in URL endpoint")
|
||||
}
|
||||
|
||||
// On windows having a preceding "/" will cause problems, if the
|
||||
// On windows having a preceding SlashSeparator will cause problems, if the
|
||||
// command line already has C:/<export-folder/ in it. Final resulting
|
||||
// path on windows might become C:/C:/ this will cause problems
|
||||
// of starting minio server properly in distributed mode on windows.
|
||||
|
||||
Reference in New Issue
Block a user