fixing false undefined error

This commit is contained in:
brent s. 2022-08-26 02:41:13 -04:00
parent 7cba7d1117
commit 2bf9323203
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
1 changed files with 27 additions and 26 deletions

View File

@ -20,13 +20,12 @@ package paths


import ( import (
"errors" "errors"
`fmt` "fmt"
`io/fs` "io/fs"
"os" "os"
"os/user" "os/user"
"path/filepath" "path/filepath"
`strings` "strings"

// "syscall" // "syscall"
) )


@ -113,6 +112,8 @@ func MakeDirIfNotExist(path string) (err error) {
if !stat.Mode().IsDir() { if !stat.Mode().IsDir() {
err = errors.New(fmt.Sprintf("path %v exists but is not a directory", locPath)) err = errors.New(fmt.Sprintf("path %v exists but is not a directory", locPath))
return return
} else {
return
} }


// This should probably never happen. Probably. // This should probably never happen. Probably.