mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 07:58:51 +01:00
bugfix
This commit is contained in:
parent
7b7c1982eb
commit
6980b93262
12
main.go
12
main.go
@ -363,7 +363,17 @@ func run() int {
|
||||
gogame.Quit()
|
||||
|
||||
fmt.Println("RUNEVT")
|
||||
exec_app_cmd := "cd " + filepath.Dir( strings.Split(strings.TrimSpace(ev.Data["Msg"]), " ")[0] )+";"
|
||||
|
||||
endpos := len(ev.Data["Msg"])
|
||||
space_break_pos := endpos
|
||||
for i:=0;i<endpos;i++ {
|
||||
if i > 6 && string(ev.Data["Msg"][i]) == "/" && string(ev.Data["Msg"][i-1]) == " " {
|
||||
space_break_pos = i-1
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
exec_app_cmd := "cd " + filepath.Dir( ev.Data["Msg"][:space_break_pos] )+";"
|
||||
exec_app_cmd += ev.Data["Msg"]
|
||||
exec_app_cmd +="; sync & cd "+UI.GetExePath()+"; "+os.Args[0]+";"
|
||||
fmt.Println(exec_app_cmd)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user