middleware/file: also react to rename events. (#406)
* middleware/file: also react to rename events. * React to all events
This commit is contained in:
parent
4ef53081c5
commit
e210b06e89
1 changed files with 1 additions and 3 deletions
|
@ -168,9 +168,7 @@ func (z *Zone) Reload() error {
|
|||
for {
|
||||
select {
|
||||
case event := <-watcher.Events:
|
||||
// Looks for Write and Create events. Write is obvious, Create is used when
|
||||
// a file is mv-ed into this place.
|
||||
if (event.Op == fsnotify.Write || event.Op == fsnotify.Create) && path.Clean(event.Name) == z.file {
|
||||
if path.Clean(event.Name) == z.file {
|
||||
|
||||
reader, err := os.Open(z.file)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue