diff options
author | Bas van Kervel <basvankervel@ziggo.nl> | 2015-05-12 20:24:11 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@ziggo.nl> | 2015-05-12 20:24:11 +0800 |
commit | b79dd188d916da7adbf448dc27b0c59a04e0938d (patch) | |
tree | 7980ae848a916171fbc65fb958eebdf0c98406dc /cmd/utils/flags.go | |
parent | d82caa5ce38705d2dcdc2ba15c93df9325504e34 (diff) | |
download | dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.gz dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.bz2 dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.lz dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.xz dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.tar.zst dexon-b79dd188d916da7adbf448dc27b0c59a04e0938d.zip |
replaced several path.* with filepath.* which is platform independent
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r-- | cmd/utils/flags.go | 13 |
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) } |