node: use APPDATA env to support cygwin/msys correctly

This commit is contained in:
hackyminer 2018-09-22 05:38:31 +09:00
parent d9e324a331
commit 6b9f68f060
No known key found for this signature in database
GPG key ID: 46D453DDCA4B766F

View file

@ -59,7 +59,7 @@ func DefaultDataDir() string {
if runtime.GOOS == "darwin" {
return filepath.Join(home, "Library", "Ethereum")
} else if runtime.GOOS == "windows" {
return filepath.Join(home, "AppData", "Roaming", "Ethereum")
return filepath.Join(os.Getenv("APPDATA"), "Ethereum")
} else {
return filepath.Join(home, ".ethereum")
}