Commit 641e380
fix: Restore generation validation in child directory sealing
This commit fixes test failures introduced by the refactoring in 609ceb8.
The refactoring incorrectly consolidated gap marking logic for the
inode == parent case, breaking two tests:
1. TestDirMTime - Directory mtime not updated when re-listing
2. TestNotifyRefreshSubfile - Deleted files not disappearing after refresh
Root Cause:
The condition at line 440 `!lock && alreadySealed` was inside the
inode == parent block that handles BOTH lock=true and lock=false cases.
This meant:
- When lock=true && alreadySealed && !hasItems: fell through to else
instead of explicitly not marking gap
- Gap marking behavior was incorrect for already-sealed directories
Fix:
Restored the original decision logic with clearer structure:
- If sealSucceeded: mark gap (both paths)
- Else if lock: don't mark gap (lock=true, already sealed)
- Else if alreadySealed: mark gap (lock=false, already sealed)
- Else: don't mark gap (lock=false, seal failed)
This preserves the original semantics while keeping the helper functions
and simplified structure from the refactoring.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 609ceb8 commit 641e380
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
| 435 | + | |
435 | 436 | | |
436 | 437 | | |
437 | | - | |
438 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
439 | 441 | | |
440 | | - | |
| 442 | + | |
441 | 443 | | |
| 444 | + | |
442 | 445 | | |
443 | 446 | | |
444 | 447 | | |
| 448 | + | |
445 | 449 | | |
446 | 450 | | |
447 | 451 | | |
| |||
0 commit comments