evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / gu / gui-for-singbox / bridge.patch
blobd919c8b57ce9f0acf8a37d02958fe73109f4dc87
1 --- old/bridge/bridge.go 2024-11-03 02:07:33.553972040 +0800
2 +++ new/bridge/bridge.go 2024-11-03 02:10:09.239584378 +0800
3 @@ -38,11 +38,6 @@
5 func InitBridge(fs embed.FS) {
6 // step1: Set Env
7 - exePath, err := os.Executable()
8 - if err != nil {
9 - panic(err)
10 - }
12 for _, v := range os.Args {
13 if v == "tasksch" {
14 Env.FromTaskSch = true
15 @@ -50,8 +45,8 @@
19 - Env.BasePath = filepath.Dir(exePath)
20 - Env.AppName = filepath.Base(exePath)
21 + Env.AppName = "GUI.for.SingBox"
22 + Env.BasePath = filepath.Join(os.Getenv("HOME"), ".config", Env.AppName)
24 // step2: Create a persistent data symlink
25 if Env.OS == "darwin" {
26 @@ -128,7 +123,7 @@
29 func (a *App) RestartApp() FlagResult {
30 - exePath := Env.BasePath + "/" + Env.AppName
31 + exePath := Env.AppName
33 cmd := exec.Command(exePath)
34 HideExecWindow(cmd)