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 (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/minio/go-homedir"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// createCertsPath create certs path.
|
// createCertsPath create certs path.
|
||||||
@ -34,11 +32,12 @@ func createCertsPath() error {
|
|||||||
|
|
||||||
// getCertsPath get certs path.
|
// getCertsPath get certs path.
|
||||||
func getCertsPath() (string, error) {
|
func getCertsPath() (string, error) {
|
||||||
homeDir, err := homedir.Dir()
|
var certsPath string
|
||||||
|
configDir, err := getConfigPath()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
certsPath := filepath.Join(homeDir, globalMinioCertsDir)
|
certsPath = filepath.Join(configDir, globalMinioCertsDir)
|
||||||
return certsPath, nil
|
return certsPath, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ const (
|
|||||||
const (
|
const (
|
||||||
globalMinioConfigVersion = "4"
|
globalMinioConfigVersion = "4"
|
||||||
globalMinioConfigDir = ".minio"
|
globalMinioConfigDir = ".minio"
|
||||||
globalMinioCertsDir = ".minio/certs"
|
globalMinioCertsDir = "certs"
|
||||||
globalMinioCertFile = "public.crt"
|
globalMinioCertFile = "public.crt"
|
||||||
globalMinioKeyFile = "private.key"
|
globalMinioKeyFile = "private.key"
|
||||||
globalMinioConfigFile = "config.json"
|
globalMinioConfigFile = "config.json"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user