From ba548cbc8e45b931aff88128705deb8116ab35ea Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 9 Jan 2024 20:20:20 +0100 Subject: delete fixed --- i_events.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'i_events.go') diff --git a/i_events.go b/i_events.go index 2484f28..4ea2a1a 100644 --- a/i_events.go +++ b/i_events.go @@ -87,12 +87,11 @@ func i_delete_host(data *HardData) { if host == nil { return } - // FIX: uncomment this after fix - // file_path := data.data_dir + host.Parent.path() + host.Filename - // - // if err := os.Remove(file_path); err != nil { - // c_die("can't remove " + file_path, err) - // } + file_path := data.data_dir + host.Parent.path() + host.Filename + + if err := os.Remove(file_path); err != nil { + c_die("can't remove " + file_path, err) + } var tmp *ItemsNode host.Parent.lhost.del(host) if data.litems.curr != nil { @@ -108,9 +107,6 @@ func i_delete_host(data *HardData) { } else { data.ui.sel_max = 0 } - // FIX: segv if only one host - // FIX: segv if del last host <- this is new, fuck - // FIX: doesn't del the first one visually } // screen events such as keypresses -- cgit v1.2.3