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