Merge branch 'ando-masaki-master'

This commit is contained in:
Nino Khodabandeh 2016-04-04 15:53:00 -07:00
commit 2e817490f9
1 changed files with 10 additions and 1 deletions

View File

@ -45,7 +45,16 @@ func (fw *InotifyFileWatcher) BlockUntilExists(t *tomb.Tomb) error {
case evt, ok := <-events:
if !ok {
return fmt.Errorf("inotify watcher has been closed")
} else if filepath.Clean(evt.Name) == fw.Filename {
}
evtName, err := filepath.Abs(evt.Name)
if err != nil {
return err
}
fwFilename, err := filepath.Abs(fw.Filename)
if err != nil {
return err
}
if evtName == fwFilename {
return nil
}
case <-t.Dying():