GP-6752 corrected bsim util input

This commit is contained in:
James
2026-04-23 10:54:12 -04:00
parent 7e116dd7fa
commit d12c1873df
@@ -564,17 +564,19 @@ public class BSimLaunchable implements GhidraLaunchable {
}
}
private boolean confirmDrop() throws IOException {
private boolean confirmDrop() {
if (booleanOptions.contains(DROP_DATABASE_FORCE_OPTION)) {
return true;
}
Console cons = System.console();
if (cons == null) {
System.out.println("Could not acquire console");
return false;
}
System.out.print("Are you sure you want to drop the database? (y/n): ");
try (InputStreamReader isReader = new InputStreamReader(System.in);
BufferedReader bReader = new BufferedReader(isReader)) {
String input = bReader.readLine();
if (input != null && input.equalsIgnoreCase("y")) {
return true;
}
String input = cons.readLine();
if (input.equalsIgnoreCase("y")) {
return true;
}
System.out.println("Database NOT dropped");
return false;