Commit 357329f
committed
refactor: improve file watcher event processing logic
Simplify should_process_event() method to eliminate ambiguous fallback behavior
and make event handling more predictable.
Changes:
- Unified path checking logic for all event types
- Move events now exclusively check dest_path (no fallback to src_path)
- Cleaner conditional flow with single path validation call
- Better error handling with consistent exception management
- Reduced code complexity from 35 to 23 lines
This improves upon PR johnhuang316#17's move event handling by removing the potential
for inconsistent behavior when dest_path validation fails.1 parent 852fcda commit 357329f
1 file changed
+14
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
387 | 386 | | |
388 | | - | |
| 387 | + | |
389 | 388 | | |
390 | 389 | | |
391 | | - | |
392 | | - | |
| 390 | + | |
393 | 391 | | |
394 | 392 | | |
395 | 393 | | |
| |||
0 commit comments