Merge pull request #933 from bas-vk/issue928

replaced path with platform aware filepath module
This commit is contained in:
Jeffrey Wilcke
2015-05-12 08:23:46 -07:00
18 changed files with 58 additions and 64 deletions

View File

@ -22,7 +22,7 @@ package main
import (
"io/ioutil"
"path"
"path/filepath"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
@ -110,7 +110,7 @@ func (ui *UiLib) ConnectToPeer(nodeURL string) {
}
func (ui *UiLib) AssetPath(p string) string {
return path.Join(ui.assetPath, p)
return filepath.Join(ui.assetPath, p)
}
func (self *UiLib) Transact(params map[string]interface{}) (string, error) {
@ -218,7 +218,7 @@ func (self *UiLib) Messages(id int) *common.List {
}
func (self *UiLib) ReadFile(p string) string {
content, err := ioutil.ReadFile(self.AssetPath(path.Join("ext", p)))
content, err := ioutil.ReadFile(self.AssetPath(filepath.Join("ext", p)))
if err != nil {
guilogger.Infoln("error reading file", p, ":", err)
}