mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
fixed peer save bug when user was not able to save it for Windows OS
This commit is contained in:
parent
9f5738b812
commit
8bf66dc0d5
2 changed files with 10 additions and 9 deletions
|
@ -176,15 +176,6 @@ func check(peer string) int64 {
|
||||||
return d.Milliseconds()
|
return d.Milliseconds()
|
||||||
}
|
}
|
||||||
|
|
||||||
func get_user_home_path() string {
|
|
||||||
path, exists := os.LookupEnv("HOME")
|
|
||||||
if exists {
|
|
||||||
return path
|
|
||||||
} else {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func run(w webview.WebView) {
|
func run(w webview.WebView) {
|
||||||
get_self(w)
|
get_self(w)
|
||||||
get_peers(w)
|
get_peers(w)
|
||||||
|
|
|
@ -4,9 +4,19 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func get_user_home_path() string {
|
||||||
|
path, exists := os.LookupEnv("USERPROFILE")
|
||||||
|
if exists {
|
||||||
|
return path
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func Console(show bool) {
|
func Console(show bool) {
|
||||||
var getWin = syscall.NewLazyDLL("kernel32.dll").NewProc("GetConsoleWindow")
|
var getWin = syscall.NewLazyDLL("kernel32.dll").NewProc("GetConsoleWindow")
|
||||||
var showWin = syscall.NewLazyDLL("user32.dll").NewProc("ShowWindow")
|
var showWin = syscall.NewLazyDLL("user32.dll").NewProc("ShowWindow")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue