You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
does not detect file that has been deleted and recreated #122
// If the event is not a DELETE or RENAME, the file must exist.
// Otherwise the event is ignored.
// *Note*: this was put in place because it was seen that a MODIFY
// event was sent after the DELETE. This ignores that MODIFY and
// assumes a DELETE will come or has come if the file doesn't exist.
if !(e.Op&Remove == Remove || e.Op&Rename == Rename) {
_, statErr := os.Lstat(e.Name)
return os.IsNotExist(statErr)
}
Activity
chennqqi commentedon Jul 2, 2017
I test poll mode will trace delete and reopen ok. but Inotify does not
yayuntian commentedon Jul 2, 2017
hope fix Inotify
yutengwan commentedon Jul 3, 2017
我也遇到了这个问题,调试之后发现
在 hpcloud/tail/vendor/gopkg.in/fsnotify.v1/inotify.go文件中,rm文件操作 默认走到了
这个逻辑上
加上判断修改如下:
测试删除和然后新创建文件,然后新增内容可以获取到
yayuntian commentedon Jul 16, 2017
@yutengwan 提交merge request呀
anbaoyong commentedon Aug 9, 2017
可以先用Poll的方式
luzhzhsoft commentedon Sep 19, 2018
@yayuntian @yutengwan 原因是这个。fsnotify/fsnotify#194
试试修改下面fsnotify的代码。把忽略的消息放出来