aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
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/geth
parentd82caa5ce38705d2dcdc2ba15c93df9325504e34 (diff)
downloadgo-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar
go-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.gz
go-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.bz2
go-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.lz
go-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.xz
go-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.zst
go-tangerine-b79dd188d916da7adbf448dc27b0c59a04e0938d.zip
replaced several path.* with filepath.* which is platform independent
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/js.go5
-rw-r--r--cmd/geth/js_test.go5
-rw-r--r--cmd/geth/main.go5
3 files changed, 7 insertions, 8 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go
index 9b0ab0a1b..d7c76d85c 100644
--- a/cmd/geth/js.go
+++ b/cmd/geth/js.go
@@ -22,9 +22,10 @@ import (
"fmt"
"math/big"
"os"
- "path"
"strings"
+ "path/filepath"
+
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common/docserver"
"github.com/ethereum/go-ethereum/common/natspec"
@@ -209,7 +210,7 @@ func (self *jsre) interactive() {
}
func (self *jsre) withHistory(op func(*os.File)) {
- hist, err := os.OpenFile(path.Join(self.ethereum.DataDir, "history"), os.O_RDWR|os.O_CREATE, os.ModePerm)
+ hist, err := os.OpenFile(filepath.Join(self.ethereum.DataDir, "history"), os.O_RDWR|os.O_CREATE, os.ModePerm)
if err != nil {
fmt.Printf("unable to open history file: %v\n", err)
return
diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go
index 52a1ad03c..3f69876f4 100644
--- a/cmd/geth/js_test.go
+++ b/cmd/geth/js_test.go
@@ -4,7 +4,6 @@ import (
"fmt"
"io/ioutil"
"os"
- "path"
"path/filepath"
"regexp"
"runtime"
@@ -96,7 +95,7 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) {
t.Fatal(err)
}
- assetPath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext")
+ assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext")
ds, err := docserver.New("/")
if err != nil {
t.Errorf("Error creating DocServer: %v", err)
@@ -361,7 +360,7 @@ func checkEvalJSON(t *testing.T, re *testjethre, expr, want string) error {
}
if err != nil {
_, file, line, _ := runtime.Caller(1)
- file = path.Base(file)
+ file = filepath.Base(file)
fmt.Printf("\t%s:%d: %v\n", file, line, err)
t.Fail()
}
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 5da59ff3b..5fe83a2a0 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -26,7 +26,6 @@ import (
"io"
"io/ioutil"
"os"
- "path"
"path/filepath"
"runtime"
"strconv"
@@ -565,7 +564,7 @@ func upgradeDb(ctx *cli.Context) {
}
filename := fmt.Sprintf("blockchain_%d_%s.chain", bcVersion, time.Now().Format("2006-01-02_15:04:05"))
- exportFile := path.Join(ctx.GlobalString(utils.DataDirFlag.Name), filename)
+ exportFile := filepath.Join(ctx.GlobalString(utils.DataDirFlag.Name), filename)
err = utils.ExportChain(ethereum.ChainManager(), exportFile)
if err != nil {
@@ -576,7 +575,7 @@ func upgradeDb(ctx *cli.Context) {
ethereum.StateDb().Close()
ethereum.ExtraDb().Close()
- os.RemoveAll(path.Join(ctx.GlobalString(utils.DataDirFlag.Name), "blockchain"))
+ os.RemoveAll(filepath.Join(ctx.GlobalString(utils.DataDirFlag.Name), "blockchain"))
ethereum, err = eth.New(cfg)
if err != nil {