Configuration tweaks - enforce default + parent file nullcheck
This commit is contained in:
@@ -93,7 +93,10 @@ public class Configuration extends ConfigurationNode {
|
||||
public boolean save() {
|
||||
FileOutputStream stream = null;
|
||||
|
||||
file.getParentFile().mkdirs();
|
||||
File parent = file.getParentFile();
|
||||
if (parent != null) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
|
||||
try {
|
||||
stream = new FileOutputStream(file);
|
||||
|
||||
Reference in New Issue
Block a user