From ed786d24b51e05a8eb8096b5925b074e4d4208fa Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Thu, 12 Aug 2021 15:27:58 -0400 Subject: [PATCH] GP-1201: Exporters with empty default extension names will no longer append a dot to the output file. --- .../ghidra/app/plugin/core/exporter/ExporterDialog.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/exporter/ExporterDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/exporter/ExporterDialog.java index 56626eccaf..e2acc6f3b8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/exporter/ExporterDialog.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/exporter/ExporterDialog.java @@ -387,7 +387,11 @@ public class ExporterDialog extends DialogComponentProvider implements AddressFa private String appendExporterFileExtension(String filename) { Exporter exporter = getSelectedExporter(); - String extension = "." + exporter.getDefaultFileExtension(); + String extension = exporter.getDefaultFileExtension(); + if (extension.isEmpty()) { + return filename; + } + extension = "." + extension; if (!filename.toLowerCase().endsWith(extension.toLowerCase())) { return filename + extension; }