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

pull/3556/head
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())
}

View File

@ -9,7 +9,7 @@ type Addition struct {
driver.RootPath
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
ShowHidden bool `json:"show_hidden" default:"true" required:"false" help:"show hidden directories and files"`
MkdirPerm uint32 `json:"mkdir_perm" default:"777"`
MkdirPerm uint32 `json:"mkdir_perm" type:"number" default:"777"`
}
var config = driver.Config{