Skip to content
Snippets Groups Projects
Unverified Commit 36c05e39 authored by meskio's avatar meskio :tent:
Browse files

[feat] make autostart local paths absolute

parent 4dd33ac7
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment