fix(local): missed type of MkdirPerm (923937b)

This commit is contained in:
Andy Hsu
2023-02-21 17:45:15 +08:00
parent d1ab2443f1
commit e39299bfe2
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,9 @@ func (d *Local) Config() driver.Config {
}
func (d *Local) Init(ctx context.Context) error {
if d.MkdirPerm == 0 {
d.MkdirPerm = 777
}
if !utils.Exists(d.GetRootPath()) {
return fmt.Errorf("root folder %s not exists", d.GetRootPath())
}