From d13eed42bf459d5862d5f5762b3882bdedd18ceb Mon Sep 17 00:00:00 2001
From: Joe <rbo@gmx.us>
Date: Thu, 11 Jan 2024 20:20:20 +0100
Subject: qwe

---
 c_hardflip.go |  2 +-
 c_init.go     |  3 +--
 i_events.go   | 14 +++++++++-----
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/c_hardflip.go b/c_hardflip.go
index c36cd3e..ca3c76f 100644
--- a/c_hardflip.go
+++ b/c_hardflip.go
@@ -63,7 +63,7 @@ type HardData struct {
 
 func main() {
 	data_dir := c_get_data_dir()
-	opts := HardOpts{true, true, false}
+	opts := HardOpts{true, true}
 	ldirs := c_load_data_dir(data_dir, opts)
 	litems := c_load_litems(ldirs)
 	data := HardData{
diff --git a/c_init.go b/c_init.go
index 2fd9033..dae6941 100644
--- a/c_init.go
+++ b/c_init.go
@@ -59,7 +59,6 @@ import (
 type HardOpts struct {
 	Icon    bool
 	Loop    bool
-	FoldAll bool
 }
 
 // this function recurses into the specified root directory in order to load
@@ -77,7 +76,7 @@ func c_recurse_data_dir(dir, root string, opts HardOpts,
 		parent,
 		depth,
 		&HostList{},
-		opts.FoldAll,
+		false,
 		nil,
 	}
 	ldirs.add_back(&dir_node)
diff --git a/i_events.go b/i_events.go
index 2e5e810..e604785 100644
--- a/i_events.go
+++ b/i_events.go
@@ -155,13 +155,17 @@ func i_delete_dir(data *HardData) {
 	if dir == nil {
 		return
 	}
-	dir_path := data.data_dir + dir.path()
-	if err := os.RemoveAll(dir_path); err != nil {
-		data.ui.s.Fini()
-		c_die("can't remove " + dir_path, err)
-	}
+	// dir_path := data.data_dir + dir.path()
+	// if err := os.RemoveAll(dir_path); err != nil {
+	// 	data.ui.s.Fini()
+	// 	c_die("can't remove " + dir_path, err)
+	// }
 	// TODO: finish this
 	// TODO: litems ldirs and shit and lots of segv
+	// TEST: single empty dir
+	// TEST: single non-empty dir
+	// TEST: first dir
+	// TEST: last dir
 }
 
 func i_delete_host(data *HardData) {
-- 
cgit v1.2.3