diff --git a/README.md b/README.md index 0906b79..8b2da11 100644 --- a/README.md +++ b/README.md @@ -195,9 +195,19 @@ cointop snapcraft [project page](https://snapcraft.io/cointop). Note: snaps don't work in Windows WSL. See this [issue thread](https://forum.snapcraft.io/t/windows-subsystem-for-linux/216). -### Windows WSL (Windows) +### Windows -Recommended to install using Go (instructions above). +### PowerShell + +Install [Go](https://golang.org/doc/install) and [git](https://git-scm.com/download/win), then: + +```powershell +go get -u github.com/miguelmota/cointop +``` + +### WSL + +Recommended to install using Go (instructions [above](#installing)). You'll need additional font support for Windows WSL. Please see the [wiki](https://github.com/miguelmota/cointop/wiki/Windows-Command-Prompt-and-WSL-Font-Support) for instructions. diff --git a/cointop/config.go b/cointop/config.go index 563c0e0..f7c7a54 100644 --- a/cointop/config.go +++ b/cointop/config.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "os" + "path/filepath" "strings" "time" @@ -71,7 +72,7 @@ func (ct *Cointop) createConfigIfNotExists() error { // NOTE: legacy support for default path path := ct.configPath() - oldConfigPath := strings.Replace(path, "cointop/config.toml", "cointop/config", 1) + oldConfigPath := NormalizePath(strings.Replace(path, "cointop/config.toml", "cointop/config", 1)) if _, err := os.Stat(oldConfigPath); err == nil { path = oldConfigPath ct.configFilepath = oldConfigPath @@ -88,8 +89,9 @@ func (ct *Cointop) createConfigIfNotExists() error { func (ct *Cointop) configDirPath() string { path := NormalizePath(ct.configFilepath) - parts := strings.Split(path, "/") - return strings.Join(parts[0:len(parts)-1], "/") + separator := string(filepath.Separator) + parts := strings.Split(path, separator) + return strings.Join(parts[0:len(parts)-1], separator) } func (ct *Cointop) configPath() string {