mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
getCertsPath should use getConfigPath instead of defaulting to users homedir. (#2039)
Fixes #2028
This commit is contained in:
parent
57bc08cc7e
commit
812554087f
7
certs.go
7
certs.go
@ -19,8 +19,6 @@ package main
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/minio/go-homedir"
|
||||
)
|
||||
|
||||
// createCertsPath create certs path.
|
||||
@ -34,11 +32,12 @@ func createCertsPath() error {
|
||||
|
||||
// getCertsPath get certs path.
|
||||
func getCertsPath() (string, error) {
|
||||
homeDir, err := homedir.Dir()
|
||||
var certsPath string
|
||||
configDir, err := getConfigPath()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
certsPath := filepath.Join(homeDir, globalMinioCertsDir)
|
||||
certsPath = filepath.Join(configDir, globalMinioCertsDir)
|
||||
return certsPath, nil
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ const (
|
||||
const (
|
||||
globalMinioConfigVersion = "4"
|
||||
globalMinioConfigDir = ".minio"
|
||||
globalMinioCertsDir = ".minio/certs"
|
||||
globalMinioCertsDir = "certs"
|
||||
globalMinioCertFile = "public.crt"
|
||||
globalMinioKeyFile = "private.key"
|
||||
globalMinioConfigFile = "config.json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user