mirror of
https://github.com/minio/minio.git
synced 2026-11-17 22:57:16 +00:00
Use filepath everywhere instead of path.{} functions for portability - fixes #656
This commit is contained in:
1 parent
285b1cc5d8
commit
641f07cecf
17 files changed
+94
-80
No files matched your search
@@ -21,7 +21,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"os/user"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/minio/minio/pkg/iodine"
|
||||
@@ -49,13 +49,13 @@ func (c *Config) SetupConfig() error {
|
||||
return iodine.New(err, nil)
|
||||
}
|
||||
|
||||
confPath := path.Join(u.HomeDir, ".minio")
|
||||
confPath := filepath.Join(u.HomeDir, ".minio")
|
||||
if err := os.MkdirAll(confPath, 0700); err != nil {
|
||||
return iodine.New(err, nil)
|
||||
}
|
||||
|
||||
c.ConfigPath = confPath
|
||||
c.ConfigFile = path.Join(c.ConfigPath, "config.json")
|
||||
c.ConfigFile = filepath.Join(c.ConfigPath, "config.json")
|
||||
if _, err := os.Stat(c.ConfigFile); os.IsNotExist(err) {
|
||||
_, err = os.Create(c.ConfigFile)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user