mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge branch 'GP-0_ryanmkurtz_PR-8251_xndcn_xml'
This commit is contained in:
commit
66f8d541ea
1 changed files with 7 additions and 2 deletions
|
@ -29,6 +29,7 @@ import ghidra.app.plugin.core.decompile.DecompilePlugin;
|
||||||
import ghidra.app.util.HelpTopics;
|
import ghidra.app.util.HelpTopics;
|
||||||
import ghidra.util.HelpLocation;
|
import ghidra.util.HelpLocation;
|
||||||
import ghidra.util.filechooser.ExtensionFileFilter;
|
import ghidra.util.filechooser.ExtensionFileFilter;
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
public class DebugDecompilerAction extends DockingAction {
|
public class DebugDecompilerAction extends DockingAction {
|
||||||
|
|
||||||
|
@ -57,6 +58,10 @@ public class DebugDecompilerAction extends DockingAction {
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// If user did not specify an extension, add .xml
|
||||||
|
if (FilenameUtils.getExtension(file.getPath()).isEmpty()) {
|
||||||
|
file = new File(file.getAbsolutePath() + ".xml");
|
||||||
|
}
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
if (OptionDialog.showYesNoDialog(parentComponent, "Overwrite Existing File?",
|
if (OptionDialog.showYesNoDialog(parentComponent, "Overwrite Existing File?",
|
||||||
"Do you want to overwrite the existing file?") == OptionDialog.OPTION_TWO) {
|
"Do you want to overwrite the existing file?") == OptionDialog.OPTION_TWO) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue