aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@ziggo.nl>2015-05-12 20:24:11 +0800
committerBas van Kervel <basvankervel@ziggo.nl>2015-05-12 20:24:11 +0800
commitb79dd188d916da7adbf448dc27b0c59a04e0938d (patch)
tree7980ae848a916171fbc65fb958eebdf0c98406dc /cmd/mist
parentd82caa5ce38705d2dcdc2ba15c93df9325504e34 (diff)
downloaddexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.gz
dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.zst
dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.zip
replaced several path.* with filepath.* which is platform independent
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/gui.go7
-rw-r--r--cmd/mist/html_container.go3
-rw-r--r--cmd/mist/ui_lib.go7
3 files changed, 9 insertions, 8 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 66614478c..36eb488ce 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -27,11 +27,12 @@ import (
"fmt"
"io/ioutil"
"math/big"
- "path"
"runtime"
"sort"
"time"
+ "path/filepath"
+
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
@@ -79,7 +80,7 @@ type Gui struct {
// Create GUI, but doesn't start it
func NewWindow(ethereum *eth.Ethereum) *Gui {
- db, err := ethdb.NewLDBDatabase(path.Join(ethereum.DataDir, "tx_database"))
+ db, err := ethdb.NewLDBDatabase(filepath.Join(ethereum.DataDir, "tx_database"))
if err != nil {
panic(err)
}
@@ -92,7 +93,7 @@ func NewWindow(ethereum *eth.Ethereum) *Gui {
plugins: make(map[string]plugin),
serviceEvents: make(chan ServEv, 1),
}
- data, _ := ioutil.ReadFile(path.Join(ethereum.DataDir, "plugins.json"))
+ data, _ := ioutil.ReadFile(filepath.Join(ethereum.DataDir, "plugins.json"))
json.Unmarshal(data, &gui.plugins)
return gui
diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go
index 7c948885a..c9b1f1cd6 100644
--- a/cmd/mist/html_container.go
+++ b/cmd/mist/html_container.go
@@ -26,7 +26,6 @@ import (
"io/ioutil"
"net/url"
"os"
- "path"
"path/filepath"
"github.com/ethereum/go-ethereum/common"
@@ -80,7 +79,7 @@ func (app *HtmlApplication) RootFolder() string {
if err != nil {
return ""
}
- return path.Dir(common.WindonizePath(folder.RequestURI()))
+ return filepath.Dir(common.WindonizePath(folder.RequestURI()))
}
func (app *HtmlApplication) RecursiveFolders() []os.FileInfo {
files, _ := ioutil.ReadDir(app.RootFolder())
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 4653e0980..eaf42db28 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -22,7 +22,8 @@ package main
import (
"io/ioutil"
- "path"
+
+ "path/filepath"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
@@ -110,7 +111,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 +219,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)
}