From cb6ff2ebbf06a6356cdc1dfc97885910aece2656 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 15 Jan 2024 20:20:20 +0100 Subject: useless --- i_events.go | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'i_events.go') 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 } -- cgit v1.2.3