diff options
author | Joe <rbo@gmx.us> | 2024-01-11 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-11 20:20:20 +0100 |
commit | bcbf5b5db7a15071da9c7ae25f4a7abdcc572587 (patch) | |
tree | 257f6b01674987e3574b413a179d203549318f9d /i_events.go | |
parent | qwe (diff) | |
download | hardflip-bcbf5b5db7a15071da9c7ae25f4a7abdcc572587.tar.gz hardflip-bcbf5b5db7a15071da9c7ae25f4a7abdcc572587.tar.bz2 hardflip-bcbf5b5db7a15071da9c7ae25f4a7abdcc572587.tar.xz hardflip-bcbf5b5db7a15071da9c7ae25f4a7abdcc572587.tar.zst hardflip-bcbf5b5db7a15071da9c7ae25f4a7abdcc572587.zip |
cool
Diffstat (limited to 'i_events.go')
-rw-r--r-- | i_events.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/i_events.go b/i_events.go index e604785..9333cfd 100644 --- a/i_events.go +++ b/i_events.go @@ -160,15 +160,23 @@ func i_delete_dir(data *HardData) { // data.ui.s.Fini() // c_die("can't remove " + dir_path, err) // } + tmp := data.litems.curr.prev + data.ldirs.del(dir) + // TODO: delete folds map reference if folded // 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 + // TEST: last dir 4m+ + // TEST: folded } func i_delete_host(data *HardData) { + if data.litems.curr == nil { + return + } if data.litems.curr.is_dir() == true { i_delete_dir(data) return @@ -183,11 +191,8 @@ func i_delete_host(data *HardData) { data.ui.s.Fini() c_die("can't remove " + file_path, err) } - var tmp *ItemsNode + tmp := data.litems.curr.prev host.Parent.lhost.del(host) - if data.litems.curr != nil { - tmp = data.litems.curr.prev - } data.litems.del(data.litems.curr) if tmp == nil { tmp = data.litems.head |