Skip to content

Commit cfd0196

Browse files
committed
create parent dirs
1 parent 14b08c7 commit cfd0196

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

etleap/src/main/java/us/hxbc/etleap/config/FileConfig.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public class FileConfig {
3838

3939
void apply() {
4040
logger.info("replacing {} with {}", path, updatePath);
41+
try {
42+
Files.createDirectories(path.getParent());
43+
} catch (IOException e) {
44+
logger.error("unable to create path", e);
45+
}
46+
4147
try (InputStream is = updatePath.openStream()) {
4248
try (OutputStream os = Files.newOutputStream(path,
4349
StandardOpenOption.CREATE, StandardOpenOption.WRITE)) {

0 commit comments

Comments
 (0)