From cb2c23939cd7a796bb2b2da313e2ce1aa54218ba Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Thu, 9 May 2024 17:24:52 +0200 Subject: [PATCH] ls only when failed to open file --- debugger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 40845bd..3932ec8 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -155,8 +155,6 @@ void ls_l(console *const cnsl) std::optional select_host_file(console *const cnsl) { for(;;) { - ls_l(cnsl); - cnsl->flush_input(); std::string selected_file = cnsl->read_line("Enter filename (or empty to abort): "); @@ -183,6 +181,8 @@ std::optional select_host_file(console *const cnsl) return selected_file; cnsl->put_string_lf("open failed"); + + ls_l(cnsl); } }