Commit fa72b28
fix: Initialize DirHandle generation correctly to prevent spurious invalidations
The tests were failing because new DirHandles started with generation=0,
but the directory might already have a non-zero generation from prior
modifications. This caused the handle to immediately think it was out
of date and reset its position, leading to missing entries in readdir.
Changes:
- Initialize generation when creating new DirHandles
- Reset generation to current when seeking to offset 0
- Ensure consistent generation tracking across all handle creation paths
This fixes the test failures where directory listings were returning
incomplete results.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 914cd97 commit fa72b28
3 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
554 | 557 | | |
555 | 558 | | |
556 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
| 781 | + | |
778 | 782 | | |
779 | 783 | | |
780 | 784 | | |
| |||
0 commit comments