mirror of
https://github.com/foomo/posh.git
synced 2025-10-16 12:45:38 +00:00
feat: check empty name
This commit is contained in:
parent
fd1fa6cc07
commit
c258cdcc49
@ -8,6 +8,9 @@ import (
|
||||
|
||||
func MkdirAll(paths ...string) error {
|
||||
for _, path := range paths {
|
||||
if path == "" {
|
||||
return errors.New("invalid empty path")
|
||||
}
|
||||
if stat, err := os.Stat(path); err != nil && os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(path, os.ModeDir|0700); err != nil {
|
||||
return err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user