diff --git a/contrib/ui/mesh-ui/webview_other.go b/contrib/ui/mesh-ui/webview_other.go index 211ffa23..6b5e208e 100755 --- a/contrib/ui/mesh-ui/webview_other.go +++ b/contrib/ui/mesh-ui/webview_other.go @@ -143,20 +143,11 @@ func check(peer string) int64 { } func get_user_home_path() string { - if runtime.GOOS == "windows" { - path, exists := os.LookupEnv("USERPROFILE") - if exists { - return path - } else { - return "" - } + path, exists := os.LookupEnv("HOME") + if exists { + return path } else { - path, exists := os.LookupEnv("HOME") - if exists { - return path - } else { - return "" - } + return "" } } diff --git a/contrib/ui/mesh-ui/webview_windows.go b/contrib/ui/mesh-ui/webview_windows.go index 5b8e3e8b..663362d3 100755 --- a/contrib/ui/mesh-ui/webview_windows.go +++ b/contrib/ui/mesh-ui/webview_windows.go @@ -4,29 +4,10 @@ package main import ( - "encoding/json" - "fmt" - "io/ioutil" - "log" - "net" - "net/url" - "os" "os/exec" - "path/filepath" - "runtime" - "strconv" - "strings" "syscall" - "time" - - "github.com/hjson/hjson-go" - "github.com/webview/webview" - - "github.com/RiV-chain/RiV-mesh/src/admin" ) -var riv_ctrl_path string - func run_command(command string) []byte { args := []string{"-json", command} cmd := exec.Command(riv_ctrl_path, args...)