1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Better mkdirs() logic.

This commit is contained in:
Cedric Beust 2016-05-04 22:23:06 -08:00
parent e91598b8aa
commit 1acce0a204

View file

@ -252,8 +252,8 @@ public class Main {
//
log(2, " Writing " + VERSION_TXT);
File parentDir = VERSION_TXT.getParentFile();
boolean success = parentDir.mkdirs();
if (success) {
parentDir.mkdirs();
if (parentDir.exists()) {
try (FileWriter fw = new FileWriter(VERSION_TXT)) {
try (BufferedWriter bw = new BufferedWriter(fw)) {
bw.write(wrapperVersion);