diff options
author | Joe <rbo@gmx.us> | 2024-01-15 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-15 20:20:20 +0100 |
commit | cb6ff2ebbf06a6356cdc1dfc97885910aece2656 (patch) | |
tree | 3a58697b19de26f1bb334c419c75292ffbbe4de4 | |
parent | i think its good? pls (diff) | |
download | hardflip-cb6ff2ebbf06a6356cdc1dfc97885910aece2656.tar.gz hardflip-cb6ff2ebbf06a6356cdc1dfc97885910aece2656.tar.bz2 hardflip-cb6ff2ebbf06a6356cdc1dfc97885910aece2656.tar.xz hardflip-cb6ff2ebbf06a6356cdc1dfc97885910aece2656.tar.zst hardflip-cb6ff2ebbf06a6356cdc1dfc97885910aece2656.zip |
useless
-rw-r--r-- | i_events.go | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/i_events.go b/i_events.go index a0dc267..e56cec4 100644 --- a/i_events.go +++ b/i_events.go @@ -184,32 +184,29 @@ func i_delete_dir(data *HardData) { i_fold_dir(data, curr) } delete(data.folds, curr.Dirs) - prev_dir := data.ldirs.prev(curr.Dirs) curr.prev.next = curr.next if curr.next != nil { curr.next.prev = curr.prev - prev_dir.next = curr.Dirs.next data.litems.curr = curr.next } else { data.litems.last = curr.prev - prev_dir.next = nil - data.ldirs.last = prev_dir - data.ldirs.last.next = nil data.litems.curr = curr.prev } for ptr := data.litems.head; ptr.next != nil; ptr = ptr.next { ptr.next.ID = ptr.ID + 1 } - 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: delete folds map reference if folded - OK - // TEST: single empty dir - // TEST: single non-empty dir - // TEST: first dir + // TEST: single empty dir OK + // TEST: single non-empty dir OK + // TEST: first dir OK + // TEST: first dir is also head // TEST: last dir + // TEST: last dir is also last // TEST: last dir 4m+ // TEST: folded } |