diff options
-rw-r--r-- | standalone.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/standalone.go b/standalone.go index 41b3c94..0808da6 100644 --- a/standalone.go +++ b/standalone.go @@ -21,6 +21,7 @@ import ( "fmt" "log" "os" + "path/filepath" "regexp" "0xacab.org/leap/bitmask-systray/bitmask" @@ -54,6 +55,13 @@ func newAutostart(appName string, iconPath string) autostart { } } + if exec[0][:2] == "./" || exec[0][:2] == ".\\" { + var err error + exec[0], err = filepath.Abs(exec[0]) + if err != nil { + log.Printf("Error making the path absolute directory: %v", err) + } + } return &pmautostart.App{ Name: appName, |