From 18d295d555528e2d5aa93b1a4c8b7c6cc3af8f18 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 15 Oct 2020 18:24:41 +0200 Subject: [bug] fix error condition for mkdir --- pkg/config/logger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/config') diff --git a/pkg/config/logger.go b/pkg/config/logger.go index a4a979a..d2d1bca 100644 --- a/pkg/config/logger.go +++ b/pkg/config/logger.go @@ -28,7 +28,7 @@ func ConfigureLogger(logPath string) (io.Closer, error) { if _, err := os.Stat(dir); err != nil { if os.IsNotExist(err) { err := os.MkdirAll(dir, 0700) - if err == nil { + if err != nil { log.Println("ERROR: cannot create data dir:", dir) } } -- cgit v1.2.3