This commit is contained in:
parent
2349ac8488
commit
fc7de5a9da
1 changed files with 15 additions and 13 deletions
|
@ -172,11 +172,12 @@ std::optional<std::string> select_host_file(console *const cnsl)
|
||||||
for(;;) {
|
for(;;) {
|
||||||
cnsl->flush_input();
|
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())
|
if (selected_file.empty())
|
||||||
return { };
|
return { };
|
||||||
|
|
||||||
|
if (selected_file != "dir") {
|
||||||
cnsl->put_string("Opening file: ");
|
cnsl->put_string("Opening file: ");
|
||||||
cnsl->put_string_lf(selected_file.c_str());
|
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;
|
return selected_file;
|
||||||
|
|
||||||
cnsl->put_string_lf("open failed");
|
cnsl->put_string_lf("open failed");
|
||||||
|
}
|
||||||
|
|
||||||
ls_l(cnsl);
|
ls_l(cnsl);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue