Skip to content

Commit bbd4f23

Browse files
committed
fix: listen to windows event
1 parent 9b29d2f commit bbd4f23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rewatch/src/watcher.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ async fn async_watch(
153153
(
154154
CompileType::None | CompileType::Incremental,
155155
// when we have a data change event, we can do an incremental compile
156-
EventKind::Modify(ModifyKind::Data(_)),
156+
EventKind::Modify(ModifyKind::Data(_)) |
157+
// windows sends ModifyKind::Any on file content changes
158+
EventKind::Modify(ModifyKind::Any),
157159
) => {
158160
// if we are going to compile incrementally, we need to mark the exact files
159161
// dirty
@@ -210,7 +212,6 @@ async fn async_watch(
210212
// these are not relevant events for compilation
211213
EventKind::Access(_)
212214
| EventKind::Other
213-
| EventKind::Modify(ModifyKind::Any)
214215
| EventKind::Modify(ModifyKind::Metadata(_))
215216
| EventKind::Modify(ModifyKind::Other),
216217
) => (),

0 commit comments

Comments
 (0)