From 7cf358a0ec369234e288af08953e2c79b0b9fcc6 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Thu, 27 Jul 2023 18:00:56 +0800 Subject: [PATCH] fix: fix CreateDir bug --- fileutil/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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