added check for ~/.config folder

This commit is contained in:
echo 2022-10-14 22:39:40 +03:30
parent a569996116
commit c9a1908276

View file

@ -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()