[add] fs allows access to the app root directory ( it's an dangerous operation, be careful to use it)
This commit is contained in:
parent
7bee60c67c
commit
00f10cd630
1 changed files with 4 additions and 1 deletions
5
fs/fs.go
5
fs/fs.go
|
|
@ -15,8 +15,11 @@ func Load(cfg config.Config) error {
|
|||
scriptRoot := filepath.Join(cfg.AppSource, "scripts")
|
||||
dslDenyList := []string{scriptRoot, cfg.DataRoot}
|
||||
|
||||
fs.Register("system", system.New(cfg.DataRoot))
|
||||
fs.Register("system", system.New(cfg.DataRoot)) // alias Data
|
||||
fs.RootRegister("dsl", dsl.New(cfg.AppSource).DenyAbs(dslDenyList...)) // DSL
|
||||
fs.RootRegister("script", system.New(scriptRoot)) // Script
|
||||
|
||||
fs.Register("app", system.New(cfg.AppSource)) // App Soruce root path, it's an dangerous operation, be careful to use it.
|
||||
fs.Register("data", system.New(cfg.DataRoot)) // Data root
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue