mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
Merge pull request #39 from soffchen/patch-4
Absolute path support for rules-dir config
This commit is contained in:
commit
b2a4039c1d
4
conf.go
4
conf.go
@ -71,7 +71,9 @@ func confInit() {
|
||||
}
|
||||
|
||||
if conf.RulesDir != "" {
|
||||
conf.RulesDir = path.Join(flag.ConfDir(), conf.RulesDir)
|
||||
if !path.IsAbs(conf.RulesDir) {
|
||||
conf.RulesDir = path.Join(flag.ConfDir(), conf.RulesDir)
|
||||
}
|
||||
ruleFolderFiles, _ := listDir(conf.RulesDir, ".rule")
|
||||
|
||||
for _, ruleFile := range ruleFolderFiles {
|
||||
|
Loading…
Reference in New Issue
Block a user