mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 15:15:37 +08:00
Decompiler: Add .xml entension when user did not specify for DebugDecompilerAction
This commit is contained in:
+5
@@ -29,6 +29,7 @@ import ghidra.app.plugin.core.decompile.DecompilePlugin;
|
||||
import ghidra.app.util.HelpTopics;
|
||||
import ghidra.util.HelpLocation;
|
||||
import ghidra.util.filechooser.ExtensionFileFilter;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
public class DebugDecompilerAction extends DockingAction {
|
||||
|
||||
@@ -57,6 +58,10 @@ public class DebugDecompilerAction extends DockingAction {
|
||||
if (file == null) {
|
||||
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 (OptionDialog.showYesNoDialog(parentComponent, "Overwrite Existing File?",
|
||||
"Do you want to overwrite the existing file?") == OptionDialog.OPTION_TWO) {
|
||||
|
||||
Reference in New Issue
Block a user