增加 dirs规则
This commit is contained in:
parent
4d0bc0886d
commit
0c5cd4a468
@ -9,6 +9,7 @@ import (
|
||||
"math/rand"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -79,6 +80,9 @@ func addWatcher() {
|
||||
if len(darr) < 1 || len(darr) > 2 {
|
||||
log.Fatalln("filegirl section monitor dirs is error. ", cfg.Monitor.IncludeDirs[i])
|
||||
}
|
||||
if strings.HasPrefix(darr[0], "/") {
|
||||
log.Fatalln("dirs must be relative paths ! err path:", cfg.Monitor.IncludeDirs[i])
|
||||
}
|
||||
if darr[0] == "." {
|
||||
if len(darr) == 2 && darr[1] == "*" {
|
||||
dirs = make([]string, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user