mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-4109 - Fixed failure to open the last used project when running a new
release of Ghidra the first time
This commit is contained in:
parent
58e22a6f7b
commit
bfd16302f1
2 changed files with 4 additions and 4 deletions
|
@ -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 value
|
||||
|
|
|
@ -192,7 +192,7 @@ public class DefaultProjectManager implements ProjectManager {
|
|||
*/
|
||||
@Override
|
||||
public 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue