clarified filename prompt
Some checks are pending
CodeQL / Analyze (push) Waiting to run

This commit is contained in:
Folkert van Heusden 2025-04-08 17:19:10 +02:00
parent 2349ac8488
commit fc7de5a9da
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -172,11 +172,12 @@ std::optional<std::string> select_host_file(console *const cnsl)
for(;;) {
cnsl->flush_input();
std::string selected_file = cnsl->read_line("Enter filename (or empty to abort): ");
std::string selected_file = cnsl->read_line("Enter filename (\"dir\" for listing or empty to abort): ");
if (selected_file.empty())
return { };
if (selected_file != "dir") {
cnsl->put_string("Opening file: ");
cnsl->put_string_lf(selected_file.c_str());
@ -196,6 +197,7 @@ std::optional<std::string> select_host_file(console *const cnsl)
return selected_file;
cnsl->put_string_lf("open failed");
}
ls_l(cnsl);
}