浏览代码

RUNEVT TrimSpace and Split space

cuu 5 年之前
父节点
当前提交
7b7c1982eb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -363,7 +363,7 @@ func run() int {
           gogame.Quit()          
           
           fmt.Println("RUNEVT")
-          exec_app_cmd := "cd " + filepath.Dir(ev.Data["Msg"])+";"
+          exec_app_cmd := "cd " + filepath.Dir( strings.Split(strings.TrimSpace(ev.Data["Msg"]), " ")[0] )+";"
           exec_app_cmd += ev.Data["Msg"]
           exec_app_cmd +="; sync & cd "+UI.GetExePath()+"; "+os.Args[0]+";"
           fmt.Println(exec_app_cmd)