Use filepath everywhere instead of path.{} functions for portability - fixes #656

This commit is contained in:
Harshavardhana
2015-06-18 16:02:34 -07:00
parent 285b1cc5d8
commit 641f07cecf
17 changed files with 94 additions and 80 deletions

View File

@@ -19,7 +19,7 @@ package config
import (
"io/ioutil"
"os"
"path"
"path/filepath"
"sync"
"testing"
@@ -38,7 +38,7 @@ func (s *MySuite) TestConfig(c *C) {
conf.ConfigLock = new(sync.RWMutex)
conf.ConfigPath, _ = ioutil.TempDir("/tmp", "minio-test-")
defer os.RemoveAll(conf.ConfigPath)
conf.ConfigFile = path.Join(conf.ConfigPath, "config.json")
conf.ConfigFile = filepath.Join(conf.ConfigPath, "config.json")
if _, err := os.Stat(conf.ConfigFile); os.IsNotExist(err) {
_, err = os.Create(conf.ConfigFile)
if err != nil {