Ghidra is a software reverse engineering (SRE) framework
GP-4109 - Fixed failure to open the last used project when running a new release of Ghidra the first time
dragonmacherbfd16302f115
diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/preferences/Preferences.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/preferences/Preferences.javaindex d00698c7e7..1d9c3b0e78 100644--- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/preferences/Preferences.java+++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/preferences/Preferences.java@@ -195,7 +195,7 @@ public class Preferences {/*** Get the property with the given name.* <p>- * Note: all <code>getProperty(...)</code> methods will first check {@link System#getProperty(String)}+ * Note: all <code>getProperty(...)</code> methods will check {@link System#getProperty(String)}* for a value first. This allows users to override preferences from the command-line.* @param name the property name* @return the current property value; null if not set@@ -213,7 +213,7 @@ public class Preferences {/*** Get the property with the given name; if there is no property, return the defaultValue.* <p>- * Note: all <code>getProperty(...)</code> methods will first check {@link System#getProperty(String)}+ * Note: all <code>getProperty(...)</code> methods will check {@link System#getProperty(String)}* for a value first. This allows users to override preferences from the command-line.* @param name the property name* @param defaultValue the default value@@ -237,7 +237,7 @@ public class Preferences {* This version of <code>getProperty</code> will, when <code>useHistoricalValue</code> is true, look* for the given preference value in the last used installation of the application.* <p>- * Note: all <code>getProperty(...)</code> methods will first check {@link System#getProperty(String)}+ * Note: all <code>getProperty(...)</code> methods will check {@link System#getProperty(String)}* for a value first. This allows users to override preferences from the command-line.** @param name The name of the property for which to get a valuediff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/DefaultProjectManager.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/DefaultProjectManager.javaindex aa510f4f32..557b3fcc59 100644--- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/DefaultProjectManager.java+++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/project/DefaultProjectManager.java@@ -192,7 +192,7 @@ public class DefaultProjectManager implements ProjectManager {*/@Overridepublic ProjectLocator getLastOpenedProject() {- String projectPath = Preferences.getProperty(LAST_OPENED_PROJECT);+ String projectPath = Preferences.getProperty(LAST_OPENED_PROJECT, null, true);if (projectPath == null || projectPath.trim().length() == 0) {return null;}