diff --git a/fileutil/file.go b/fileutil/file.go index 349012a..a8ada20 100644 --- a/fileutil/file.go +++ b/fileutil/file.go @@ -50,7 +50,7 @@ func CreateFile(path string) bool { // CreateDir create directory in absolute path. param `absPath` like /a/, /a/b/ func CreateDir(absPath string) error { - return os.MkdirAll(path.Dir(absPath), os.ModePerm) + return os.MkdirAll(absPath, os.ModePerm) } // IsDir checks if the path is directory or not