Fixing minor issue with finding old preference files in development

mode.
This commit is contained in:
Ryan Kurtz 2019-05-24 13:00:19 -04:00
parent 8cdfe79def
commit 41cdb53593

View file

@ -165,14 +165,20 @@ public class GenericRunInfo {
for (File dir : getUserSettingsDirsByTime()) { for (File dir : getUserSettingsDirsByTime()) {
String dirName = dir.getName(); String dirName = dir.getName();
// Ignore the currently active user settings directory.
// By definition, it is not a previous one.
if (dirName.equals(Application.getUserSettingsDirectory().getName())) {
continue;
}
if (dirName.startsWith(".")) { if (dirName.startsWith(".")) {
dirName = dirName.substring(1); dirName = dirName.substring(1);
} }
try { try {
ApplicationIdentifier identifier = new ApplicationIdentifier(dirName); // The current release name has to match for it to be considered
if (!identifier.equals(myIdentifier) && if (new ApplicationIdentifier(dirName).getApplicationReleaseName().equals(
identifier.getApplicationReleaseName().equalsIgnoreCase( myIdentifier.getApplicationReleaseName())) {
myIdentifier.getApplicationReleaseName())) {
applicationSettiingsDirs.add(dir); applicationSettiingsDirs.add(dir);
} }
} }