From ae32625613e9f5a6ddd5f0394fc8028012a4989d Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 17 Dec 2024 12:11:10 -0500 Subject: [PATCH] GP-5202: Saving last filesystem import location when opened via File -> Import File --- .../main/java/ghidra/plugin/importer/ImporterDialog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterDialog.java index a0b6087f75..5fe7b5e1f2 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterDialog.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterDialog.java @@ -116,11 +116,12 @@ public class ImporterDialog extends DialogComponentProvider { this.suggestedDestinationPath = suggestedDestinationPath; if (FileSystemService.getInstance().isLocal(fsrl)) { - // only save the imported file's path if its a local filesystem path that - // will be valid when used later. FSRL paths that drill into container files - // aren't widely supported yet. Preferences.setProperty(Preferences.LAST_IMPORT_FILE, fsrl.getPath()); } + else if (fsrl.getFS().getContainer() != null) { + Preferences.setProperty(Preferences.LAST_IMPORT_FILE, + fsrl.getFS().getContainer().getPath()); + } addWorkPanel(buildWorkPanel()); addOKButton();