Skip to content

Commit

Permalink
fix data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
czhang-nbai committed Jan 7, 2020
1 parent 7e6ab10 commit c32a1f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
)

const (
clientIdentifier = "geth" // Client identifier to advertise over the network
clientIdentifier = "gnbai" // Client identifier to advertise over the network
)

var (
Expand Down
8 changes: 4 additions & 4 deletions node/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ func DefaultDataDir() string {
if home != "" {
switch runtime.GOOS {
case "darwin":
return filepath.Join(home, "Library", "Gnbai")
return filepath.Join(home, "Library", "Ethereum")
case "windows":
// We used to put everything in %HOME%\AppData\Roaming, but this caused
// problems with non-typical setups. If this fallback location exists and
// is non-empty, use it, otherwise DTRT and check %LOCALAPPDATA%.
fallback := filepath.Join(home, "AppData", "Roaming", "Gnbai")
fallback := filepath.Join(home, "AppData", "Roaming", "Ethereum")
appdata := windowsAppData()
if appdata == "" || isNonEmptyDir(fallback) {
return fallback
}
return filepath.Join(appdata, "Gnbai")
return filepath.Join(appdata, "Ethereum")
default:
return filepath.Join(home, ".gnbai")
return filepath.Join(home, ".ethereum")
}
}
// As we cannot guess a stable location, return empty and handle later
Expand Down

0 comments on commit c32a1f7

Please sign in to comment.