diff options
author | Joe <rbo@gmx.us> | 2024-01-09 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-09 20:20:20 +0100 |
commit | ba548cbc8e45b931aff88128705deb8116ab35ea (patch) | |
tree | 31a0ba1aafb6fd56bae35385f9f2c9d24ae1733e /i_events.go | |
parent | in progress (diff) | |
download | hardflip-ba548cbc8e45b931aff88128705deb8116ab35ea.tar.gz hardflip-ba548cbc8e45b931aff88128705deb8116ab35ea.tar.bz2 hardflip-ba548cbc8e45b931aff88128705deb8116ab35ea.tar.xz hardflip-ba548cbc8e45b931aff88128705deb8116ab35ea.tar.zst hardflip-ba548cbc8e45b931aff88128705deb8116ab35ea.zip |
delete fixed
Diffstat (limited to 'i_events.go')
-rw-r--r-- | i_events.go | 14 |
1 files changed, 5 insertions, 9 deletions
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 |