(event fsnotify.Event)
| 143 | } |
| 144 | |
| 145 | func (w *Watcher) handleEvent(event fsnotify.Event) { |
| 146 | w.mutex.Lock() |
| 147 | defer w.mutex.Unlock() |
| 148 | |
| 149 | fileName := filepath.ToSlash(event.Name) |
| 150 | if event.Op == fsnotify.Chmod { |
| 151 | return |
| 152 | } |
| 153 | if !isValidSubSettingsFileName(fileName) { |
| 154 | return |
| 155 | } |
| 156 | w.handleSettingsFileEvent(event, fileName) |
| 157 | } |
| 158 | |
| 159 | var validFileRe = regexp.MustCompile(`^[a-zA-Z0-9_@.-]+\.json$`) |
| 160 |
no test coverage detected