getCertsPath should use getConfigPath instead of defaulting to users homedir. (#2039)

Fixes #2028
master
Danilo Pereira 8 years ago committed by Harshavardhana
parent 57bc08cc7e
commit 812554087f
  1. 7
      certs.go
  2. 2
      globals.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…
Cancel
Save