aboutsummaryrefslogtreecommitdiffstats
path: root/eth/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/config.go')
-rw-r--r--eth/config.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/eth/config.go b/eth/config.go
index f71b8dfee..aca9b5e68 100644
--- a/eth/config.go
+++ b/eth/config.go
@@ -68,8 +68,15 @@ func init() {
home = user.HomeDir
}
}
- if runtime.GOOS == "windows" {
- DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "AppData", "Ethash")
+ if runtime.GOOS == "darwin" {
+ DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "Library", "Ethash")
+ } else if runtime.GOOS == "windows" {
+ localappdata := os.Getenv("LOCALAPPDATA")
+ if localappdata != "" {
+ DefaultConfig.Ethash.DatasetDir = filepath.Join(localappdata, "Ethash")
+ } else {
+ DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "AppData", "Local", "Ethash")
+ }
} else {
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, ".ethash")
}