File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -65,3 +65,7 @@ runner = "green"
65
65
[misc ]
66
66
# Delete tmp directory on exit
67
67
clean_on_exit = true
68
+
69
+ [screen ]
70
+ clear_on_rebuild = true
71
+ keep_scroll = true
Original file line number Diff line number Diff line change @@ -239,6 +239,9 @@ func (e *Engine) watchPath(path string) error {
239
239
return
240
240
case ev := <- e .watcher .Events ():
241
241
e .mainDebug ("event: %+v" , ev )
242
+ if ! validEvent (ev ) {
243
+ break
244
+ }
242
245
if isDir (ev .Name ) {
243
246
e .watchNewDir (ev .Name , removeEvent (ev ))
244
247
break
Original file line number Diff line number Diff line change @@ -215,6 +215,12 @@ func isDir(path string) bool {
215
215
return i .IsDir ()
216
216
}
217
217
218
+ func validEvent (ev fsnotify.Event ) bool {
219
+ return ev .Op & fsnotify .Create == fsnotify .Create ||
220
+ ev .Op & fsnotify .Write == fsnotify .Write ||
221
+ ev .Op & fsnotify .Remove == fsnotify .Remove
222
+ }
223
+
218
224
func removeEvent (ev fsnotify.Event ) bool {
219
225
return ev .Op & fsnotify .Remove == fsnotify .Remove
220
226
}
You can’t perform that action at this time.
0 commit comments