Skip to content

Commit

Permalink
bugfix: Fix default path creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Apr 25, 2024
1 parent f3df01c commit 64cad5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var (
DataDirFlag = Flag{
Name: c_GlobalFlagPrefix + "data-dir",
Abbreviation: "d",
Value: xdg.DataHome + "/" + constants.APP_NAME + "/",
Value: filepath.Join(xdg.DataHome, constants.APP_NAME),
Usage: "data directory" + generateEnvDoc(c_GlobalFlagPrefix+"data-dir"),
}

Expand Down
5 changes: 4 additions & 1 deletion node/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
package node

import (
"path/filepath"

"github.com/adrg/xdg"
"github.com/dominant-strategies/go-quai/common/constants"
"github.com/dominant-strategies/go-quai/rpc"
)

Expand All @@ -30,7 +33,7 @@ const (

// DefaultConfig contains reasonable default settings.
var DefaultConfig = Config{
DataDir: xdg.DataHome,
DataDir: filepath.Join(xdg.DataHome, constants.APP_NAME),
HTTPPort: DefaultHTTPPort,
HTTPModules: []string{"net", "web3"},
HTTPVirtualHosts: []string{"localhost"},
Expand Down

0 comments on commit 64cad5d

Please sign in to comment.