From 18a7bbca225b88b8f93e0ffb267f931be70e5d42 Mon Sep 17 00:00:00 2001 From: Collins Olanrewaju Date: Sun, 19 Jan 2020 05:47:04 +0100 Subject: [PATCH] replace 0700 -> os.ModePerm --- multiwallet.go | 2 +- utils/netparams.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multiwallet.go b/multiwallet.go index 30b3f5a9..8e55c9ff 100644 --- a/multiwallet.go +++ b/multiwallet.go @@ -45,7 +45,7 @@ func NewMultiWallet(rootDir, dbDriver, netType string) (*MultiWallet, error) { } rootDir = filepath.Join(rootDir, netType) - err = os.MkdirAll(rootDir, 0700) + err = os.MkdirAll(rootDir, os.ModePerm) if err != nil { return nil, errors.Errorf("failed to create rootDir: %v", err) } diff --git a/utils/netparams.go b/utils/netparams.go index 588bf840..1f173ce0 100644 --- a/utils/netparams.go +++ b/utils/netparams.go @@ -19,6 +19,6 @@ func ChainParams(netType string) (*chaincfg.Params, error) { case strings.ToLower(testnetParams.Name): return testnetParams, nil default: - return nil, errors.New("net type must be either mainnet or testnet3") + return nil, errors.New("invalid net type") } }