aboutsummaryrefslogtreecommitdiffstats
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
commitd13eed42bf459d5862d5f5762b3882bdedd18ceb (patch)
treee6d93065fa0a4192f3f85910ce2945271d7b1bfc
parentup (diff)
downloadhardflip-d13eed42bf459d5862d5f5762b3882bdedd18ceb.tar.gz
hardflip-d13eed42bf459d5862d5f5762b3882bdedd18ceb.tar.bz2
hardflip-d13eed42bf459d5862d5f5762b3882bdedd18ceb.tar.xz
hardflip-d13eed42bf459d5862d5f5762b3882bdedd18ceb.tar.zst
hardflip-d13eed42bf459d5862d5f5762b3882bdedd18ceb.zip
qwe
Diffstat (limited to '')
-rw-r--r--c_hardflip.go2
-rw-r--r--c_init.go3
-rw-r--r--i_events.go14
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) {