mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 18:10:24 +08:00
GP-6752 corrected bsim util input
This commit is contained in:
+9
-7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user