Fix MustDir config type to create directory
This commit is contained in:
parent
59aa6af767
commit
391681447e
@ -34,6 +34,10 @@ func (u *MustDir) Validate() error {
|
||||
return fmt.Errorf("path name must not be empty")
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(val, 0750); err != nil {
|
||||
return fmt.Errorf("%s can't be created (%w)", val, err)
|
||||
}
|
||||
|
||||
finfo, err := os.Stat(val)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s does not exist", val)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user