From df9c4835c41b41b4d151deca4900c345c2011031 Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Tue, 14 Apr 2020 00:03:16 -0400 Subject: [PATCH] fix folder adding Sorry dane I missed that I nested those. --- config/config.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/config/config.go b/config/config.go index c2cbe8e..c7714b7 100644 --- a/config/config.go +++ b/config/config.go @@ -350,19 +350,15 @@ func (c *Configuration) EnsureFilePermissions() error { } // create the daemon-data dir if it doesn't exist - p, file := path.Split(c.System.Data) + p, _ := path.Split(c.System.Data) if _, err := os.Stat(c.System.Data); err != nil { // if file doesn't exist if os.IsNotExist(err) { // - if _, err = os.Stat(c.System.Data); err != nil { - if file == "" { - if err = os.Mkdir(p, 0755); err != nil { - } - zap.S().Debugf("created %s folder", c.System.Data) - } + if err = os.Mkdir(p, 0755); err != nil { } + zap.S().Debugf("created %s folder", c.System.Data) } }