This commit is contained in:
hxy1991 2018-12-19 10:36:59 +08:00
parent 53eb990328
commit 0b65e34fd0

View File

@ -104,10 +104,14 @@ public class LocalConfigInfoProcessor {
} }
} else { } else {
try { try {
boolean isMdOk = file.getParentFile().mkdirs(); File parentFile = file.getParentFile();
if (!parentFile.exists()) {
boolean isMdOk = parentFile.mkdirs();
if (!isMdOk) { if (!isMdOk) {
log.error(envName, "NACOS-XXXX", "save snapshot error"); log.error(envName, "NACOS-XXXX", "save snapshot error");
} }
}
if (JVMUtil.isMultiInstance()) { if (JVMUtil.isMultiInstance()) {
ConcurrentDiskUtil.writeFileContent(file, config, ConcurrentDiskUtil.writeFileContent(file, config,
Constants.ENCODE); Constants.ENCODE);