From 88aca9157998d0f9d0bee0080d588d05198e84e9 Mon Sep 17 00:00:00 2001 From: Daniel Milde Date: Tue, 5 Jan 2021 00:48:39 +0100 Subject: [PATCH] do not try to delete when showing devices --- cli/cli.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/cli.go b/cli/cli.go index 6a417db65..25b48210e 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -376,6 +376,9 @@ func (ui *UI) keyPressed(key *tcell.EventKey) *tcell.EventKey { ui.showHelp() break case 'd': + if ui.currentDir == nil { + break + } if ui.askBeforeDelete { ui.confirmDeletion() } else {