From f879648e5017fa9b0fde5016de46dc8be3df911d Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 11 Jan 2024 20:20:20 +0100 Subject: fix that now --- c_ldirs.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'c_ldirs.go') diff --git a/c_ldirs.go b/c_ldirs.go index 393e6dd..266bf5b 100644 --- a/c_ldirs.go +++ b/c_ldirs.go @@ -161,10 +161,12 @@ func (dir *DirsNode) count_elements(skip_folds bool, items += dir.count_hosts() for ptr := dir.next; ptr != nil && ptr.Depth > dir.Depth; ptr = ptr.next { - if skip_folds == true && folds[dir] != nil { - items += 1 - // HACK: key to the map is the key - // TODO: fix you shit + if skip_folds == true && lfold := folds[ptr] != nil { + lfold.head + for i := 1; i < count; i++ { + ptr = ptr.next + } + // FIX: fix you shit } else { items += ptr.count_hosts() + 1 } -- cgit v1.2.3