Commit 4087e30
committed
Bugfix: File watcher panicked on 500+ external changes
- `handle_directory_change_incremental` falls back to a full reread when a
debouncer batch has more than 500 events, and the error path in the
debouncer callback did the same. Both used `tokio::spawn`, but the
callback runs on the `notify-rs` debouncer thread which has no Tokio
runtime context, so the spawn panicked (`there is no reactor running`)
and the full-reread event never reached the frontend.
- Switch to `tauri::async_runtime::spawn` (same pattern `indexing::watcher`
already uses for the same reason).
- Fixes `file-watching.spec.ts` "handles 600+ files" on Linux Docker.1 parent dd06d68 commit 4087e30
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| |||
0 commit comments