aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-12 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-12 20:20:20 +0100
commit186989bbfef77e74c5d1116bcb1ad196eab23d06 (patch)
treeff646356a45d6a62ae628e0f367cb8d1a6806fc5
parentfix that (diff)
downloadhardflip-186989bbfef77e74c5d1116bcb1ad196eab23d06.tar.gz
hardflip-186989bbfef77e74c5d1116bcb1ad196eab23d06.tar.bz2
hardflip-186989bbfef77e74c5d1116bcb1ad196eab23d06.tar.xz
hardflip-186989bbfef77e74c5d1116bcb1ad196eab23d06.tar.zst
hardflip-186989bbfef77e74c5d1116bcb1ad196eab23d06.zip
debug
-rw-r--r--c_ldirs.go1
-rw-r--r--i_events.go11
2 files changed, 8 insertions, 4 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index 3de40e5..2fca939 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -165,6 +165,7 @@ func (dir *DirsNode) count_hosts() int {
}
return dir.lhost.last.ID + 1
}
+
// return the number of hosts and subfolders of the dir
// func (item *ItemsNode) count_elements(skip_folds bool,
// folds map[*DirsNode]*ItemsList) (*ItemsNode, int) {
diff --git a/i_events.go b/i_events.go
index 34f6daf..c1f2d1e 100644
--- a/i_events.go
+++ b/i_events.go
@@ -128,14 +128,17 @@ func i_fold_dir(data *HardData, item *ItemsNode) {
ptr = ptr.next
// FIX: fix your crap
}
- if ptr == item {
+ if ptr == nil {
folded_end = nil
after = nil
- } else {
- folded_end = ptr.prev
data.ui.s.Fini()
- fmt.Println("qwe:", ptr.Dirs)
+ fmt.Println("ptr:", ptr)
os.Exit(0)
+ } else if ptr == item {
+ folded_end = nil
+ after = nil
+ } else {
+ folded_end = ptr.prev
after = folded_end.next
folded_end.next = nil
}