Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hxy1991 committed Dec 19, 2018
1 parent 53eb990 commit 0b65e34
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,14 @@ static public void saveSnapshot(String envName, String dataId, String group, Str
}
} else {
try {
boolean isMdOk = file.getParentFile().mkdirs();
if (!isMdOk) {
log.error(envName, "NACOS-XXXX", "save snapshot error");
File parentFile = file.getParentFile();
if (!parentFile.exists()) {
boolean isMdOk = parentFile.mkdirs();
if (!isMdOk) {
log.error(envName, "NACOS-XXXX", "save snapshot error");
}
}

if (JVMUtil.isMultiInstance()) {
ConcurrentDiskUtil.writeFileContent(file, config,
Constants.ENCODE);
Expand Down

0 comments on commit 0b65e34

Please sign in to comment.