From cd7fe6c869357b83e6415213223eca5c0d2c24a7 Mon Sep 17 00:00:00 2001 From: Michael Tibben Date: Mon, 19 Dec 2022 16:01:23 +1100 Subject: [PATCH] Update file.go --- file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.go b/file.go index ac4c324..268a142 100644 --- a/file.go +++ b/file.go @@ -45,7 +45,7 @@ func (k *fileKeyring) resolveDir() (string, error) { stat, err := os.Stat(dir) if os.IsNotExist(err) { err = os.MkdirAll(dir, 0700) - } else if err != nil && stat !=nil && !stat.IsDir() { + } else if err != nil && stat != nil && !stat.IsDir() { err = fmt.Errorf("%s is a file, not a directory", dir) }