mirror of https://github.com/Xhofe/alist
fix(local): missed type of `MkdirPerm` (923937b
)
parent
d1ab2443f1
commit
e39299bfe2
|
@ -35,6 +35,9 @@ func (d *Local) Config() driver.Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Local) Init(ctx context.Context) error {
|
func (d *Local) Init(ctx context.Context) error {
|
||||||
|
if d.MkdirPerm == 0 {
|
||||||
|
d.MkdirPerm = 777
|
||||||
|
}
|
||||||
if !utils.Exists(d.GetRootPath()) {
|
if !utils.Exists(d.GetRootPath()) {
|
||||||
return fmt.Errorf("root folder %s not exists", d.GetRootPath())
|
return fmt.Errorf("root folder %s not exists", d.GetRootPath())
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ type Addition struct {
|
||||||
driver.RootPath
|
driver.RootPath
|
||||||
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
|
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
|
||||||
ShowHidden bool `json:"show_hidden" default:"true" required:"false" help:"show hidden directories and files"`
|
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{
|
var config = driver.Config{
|
||||||
|
|
Loading…
Reference in New Issue