aboutsummaryrefslogtreecommitdiffstats
path: root/c_ldirs.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-11 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-11 20:20:20 +0100
commit126c13a9234317769088337bea9e263fd588c71c (patch)
tree927b57904f12271b10f9761508dd615bc50001c0 /c_ldirs.go
parentrevert here if needed (diff)
downloadhardflip-126c13a9234317769088337bea9e263fd588c71c.tar.gz
hardflip-126c13a9234317769088337bea9e263fd588c71c.tar.bz2
hardflip-126c13a9234317769088337bea9e263fd588c71c.tar.xz
hardflip-126c13a9234317769088337bea9e263fd588c71c.tar.zst
hardflip-126c13a9234317769088337bea9e263fd588c71c.zip
folded was useless indeed
Diffstat (limited to '')
-rw-r--r--c_ldirs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index 688c119..393e6dd 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -57,7 +57,6 @@ type DirsNode struct {
Parent *DirsNode
Depth uint16
lhost *HostList
- Folded bool
next *DirsNode
}
@@ -156,12 +155,13 @@ func (dir *DirsNode) count_hosts() int {
}
// return the number of hosts and subfolders of the dir
-func (dir *DirsNode) count_elements(skip_folds bool) int {
+func (dir *DirsNode) count_elements(skip_folds bool,
+ folds map[*DirsNode]*ItemsList) int {
items := 0
items += dir.count_hosts()
for ptr := dir.next; ptr != nil && ptr.Depth > dir.Depth; ptr = ptr.next {
- if skip_folds == true && ptr.Folded == true {
+ if skip_folds == true && folds[dir] != nil {
items += 1
// HACK: key to the map is the key
// TODO: fix you shit