diff options
author | Joe <rbo@gmx.us> | 2024-01-11 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-11 20:20:20 +0100 |
commit | 126c13a9234317769088337bea9e263fd588c71c (patch) | |
tree | 927b57904f12271b10f9761508dd615bc50001c0 /c_ldirs.go | |
parent | revert here if needed (diff) | |
download | hardflip-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.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |