From c9a1908276fe2ad0d2bc6f487d1b45207ed0b9f0 Mon Sep 17 00:00:00 2001 From: echo <91651232+exhq@users.noreply.github.com> Date: Fri, 14 Oct 2022 22:39:40 +0330 Subject: [PATCH] added check for ~/.config folder --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index f6c8705..062d5e6 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,13 @@ import ( var isuwuified bool = true +func checkforconfigfolder(){ + _, folder := os.Stat(data.GetHome()+"/.config") + if os.IsNotExist(folder) { + os.Mkdir(data.GetHome()+"/.config", os.ModePerm) + } +} + func handleConfig() { _, folder := os.Stat(filepath.Dir(data.GetConfigFile())) _, file := os.Stat(data.GetConfigFile()) @@ -84,6 +91,7 @@ func handlePrint(action, format string, rest string) { } func main() { + checkforconfigfolder() utils.Initargs() utils.Initcolor() utils.CutePrintInit()