diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-05-15 12:30:41 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-05-26 12:54:51 +0200 |
commit | 3681fd33051eec54d79542205c7409c3573399bf (patch) | |
tree | 78e727fccffa691375aa0112e1196c952c21ee36 | |
parent | 8382f3b14a6e82f0359a4fe68aee077c1c8665ef (diff) |
[feat] create config folder if it doesn't exist
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -32,6 +32,10 @@ const ( var printer *message.Printer func main() { + if _, err := os.Stat(bitmask.ConfigPath); os.IsNotExist(err) { + os.MkdirAll(bitmask.ConfigPath, os.ModePerm) + } + err := acquirePID() if err != nil { log.Fatal(err) @@ -46,6 +50,7 @@ func main() { b, err := bitmask.Init() if err != nil { log.Print(err) + notify.bitmaskNotRunning() return } defer b.Close() |