aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index dd3b6c8a2..8c76a6edb 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -7,9 +7,10 @@ import (
"math/big"
"net/http"
"os"
- "path"
"runtime"
+ "path/filepath"
+
"github.com/codegangsta/cli"
"github.com/ethereum/ethash"
"github.com/ethereum/go-ethereum/accounts"
@@ -55,7 +56,7 @@ OPTIONS:
// NewApp creates an app with sane defaults.
func NewApp(version, usage string) *cli.App {
app := cli.NewApp()
- app.Name = path.Base(os.Args[0])
+ app.Name = filepath.Base(os.Args[0])
app.Author = ""
//app.Authors = nil
app.Email = ""
@@ -319,17 +320,17 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
func GetChain(ctx *cli.Context) (*core.ChainManager, common.Database, common.Database) {
dataDir := ctx.GlobalString(DataDirFlag.Name)
- blockDb, err := ethdb.NewLDBDatabase(path.Join(dataDir, "blockchain"))
+ blockDb, err := ethdb.NewLDBDatabase(filepath.Join(dataDir, "blockchain"))
if err != nil {
Fatalf("Could not open database: %v", err)
}
- stateDb, err := ethdb.NewLDBDatabase(path.Join(dataDir, "state"))
+ stateDb, err := ethdb.NewLDBDatabase(filepath.Join(dataDir, "state"))
if err != nil {
Fatalf("Could not open database: %v", err)
}
- extraDb, err := ethdb.NewLDBDatabase(path.Join(dataDir, "extra"))
+ extraDb, err := ethdb.NewLDBDatabase(filepath.Join(dataDir, "extra"))
if err != nil {
Fatalf("Could not open database: %v", err)
}
@@ -346,7 +347,7 @@ func GetChain(ctx *cli.Context) (*core.ChainManager, common.Database, common.Dat
func GetAccountManager(ctx *cli.Context) *accounts.Manager {
dataDir := ctx.GlobalString(DataDirFlag.Name)
- ks := crypto.NewKeyStorePassphrase(path.Join(dataDir, "keys"))
+ ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keys"))
return accounts.NewManager(ks)
}