Skip to content

Commit

Permalink
Interactive mode lacks support for spaces in filepaths
Browse files Browse the repository at this point in the history
Fixes #8
  • Loading branch information
Pengor committed May 19, 2021
1 parent 150ab69 commit 198168b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/InputHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ const char* WEBSITE_MESSAGE = "https://github.com/Pengor/chia-log-analysis";
// in_dir will be set when this returns
void InputHandler::promptForInDir(void) {
cout << "Enter directory to read logs from:" << endl;
cin >> this->in_dir;
getline(cin, in_dir);

while (!filesystem::is_directory(in_dir)) {
cout << "DIRECTORY INVALID" << endl;
cout << "Enter directory to read logs from:" << endl;
cin >> this->in_dir;
getline(cin, in_dir);
}
}

// Prompt the user for the output filename until a valid one is provided
// out_file will be set when this returns
void InputHandler::promptForOutFile(void) {
cout << "Enter filename to save output to:" << endl;
cin >> this->out_filename;
getline(cin, out_filename);

while (!outFileValid()) {
cout << "FILE INVALID" << endl;
cout << "Enter filename to save output to:" << endl;
cin >> this->out_filename;
getline(cin, out_filename);
}
}

Expand Down

0 comments on commit 198168b

Please sign in to comment.