mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-23 13:52:26 +08:00
fix: fix CreateDir bug
This commit is contained in:
@@ -50,7 +50,7 @@ func CreateFile(path string) bool {
|
|||||||
|
|
||||||
// CreateDir create directory in absolute path. param `absPath` like /a/, /a/b/
|
// CreateDir create directory in absolute path. param `absPath` like /a/, /a/b/
|
||||||
func CreateDir(absPath string) error {
|
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
|
// IsDir checks if the path is directory or not
|
||||||
|
|||||||
Reference in New Issue
Block a user