fstrigger build
This commit is contained in:
parent
b5b0615018
commit
9293458ef1
9
main.go
9
main.go
@ -177,11 +177,14 @@ func startWatcher(directory *DirectoryConfig) {
|
|||||||
directory._regexMatches = directory._regex.FindStringSubmatch(p)
|
directory._regexMatches = directory._regex.FindStringSubmatch(p)
|
||||||
}
|
}
|
||||||
if directory._regex == nil || directory._regexMatches != nil {
|
if directory._regex == nil || directory._regexMatches != nil {
|
||||||
var statErr error
|
var missing bool
|
||||||
if directory.IgnoreMissing {
|
if directory.IgnoreMissing {
|
||||||
_, statErr = os.Stat(p)
|
if _, statErr := os.Stat(p); os.IsNotExist(statErr) {
|
||||||
|
missing = true
|
||||||
|
log.Printf("[ INFO ] path=\"%s\" missing=\"true\"\n", p)
|
||||||
}
|
}
|
||||||
if directory.IgnoreMissing || !os.IsNotExist(statErr) {
|
}
|
||||||
|
if directory.IgnoreMissing || !missing {
|
||||||
for _, action := range directory.Actions {
|
for _, action := range directory.Actions {
|
||||||
action.Directory = directory
|
action.Directory = directory
|
||||||
contin, _ := runAction(&action, eventInfo, nil)
|
contin, _ := runAction(&action, eventInfo, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user