fix the pop-up of license window
Signed-off-by: pengzhile <pengzhile@gmail.com>
This commit is contained in:
@@ -47,6 +47,22 @@ public class Resetter {
|
||||
}
|
||||
}
|
||||
|
||||
File licenseDir = getLicenseDir();
|
||||
if (licenseDir.exists()) {
|
||||
File[] files = licenseDir.listFiles();
|
||||
if (files == null) {
|
||||
NotificationHelper.showError(null, "List license file failed!");
|
||||
} else {
|
||||
for (File file : files) {
|
||||
if (!file.getName().endsWith(".key") && !file.getName().endsWith(".license")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
list.add(new NormalFileRecord(file));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Element state = PropertyRecord.PROPS.getState();
|
||||
if (state != null) {
|
||||
Attribute attrName, attrValue;
|
||||
@@ -171,6 +187,10 @@ public class Resetter {
|
||||
return new File(configPath, "eval");
|
||||
}
|
||||
|
||||
protected static File getLicenseDir() {
|
||||
return new File(PathManager.getConfigPath());
|
||||
}
|
||||
|
||||
protected static void getAllPrefsKeys(Preferences prefs, List<String> list) throws BackingStoreException {
|
||||
String[] childrenNames = prefs.childrenNames();
|
||||
if (childrenNames.length == 0) {
|
||||
|
||||
Reference in New Issue
Block a user