commit 183118dae0d139cd30192c990ffa06f3839385a5
parent a2e9d3f38ef8770ee7d2407055dfb60b83112a5c
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date: Sun, 20 Sep 2026 07:43:37 -0300
main: stop emptying the tree under the thread reading it
The final pass zeroed the node count before reprojecting, and the UI thread walks
parent links out of the same tree to render the paths of the rows it drew. A
count of zero makes every parent look out of range, so for the width of that pass
the loop printed a bare name instead of a path, once per live run.
Extra names now land on fixed slots, so the reprojection overwrites in place and
the count never has to move.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/builder.odin b/builder.odin
@@ -57,9 +57,11 @@ builder_run :: proc(b: ^Builder) {
builder_pass :: proc(b: ^Builder, exact: bool) {
if exact {
// A record settled mid-scan misses whatever extension records added to it
- // afterwards, so the last pass redoes every one of them.
+ // afterwards, so the last pass redoes every one of them. The tree is not
+ // emptied first: a UI resolves the paths of the rows it drew from it, and an
+ // empty tree would hand that thread a truncated one. Redoing a projection
+ // rewrites each slot where it already sat.
ntfs.projection_reset(&b.projection)
- b.tree.count = 0
}
if err := ntfs.to_tree(b.table, b.tree, &b.projection); err != nil {
return