1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -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); log(2, " Writing " + VERSION_TXT);
File parentDir = VERSION_TXT.getParentFile(); File parentDir = VERSION_TXT.getParentFile();
boolean success = parentDir.mkdirs(); parentDir.mkdirs();
if (success) { if (parentDir.exists()) {
try (FileWriter fw = new FileWriter(VERSION_TXT)) { try (FileWriter fw = new FileWriter(VERSION_TXT)) {
try (BufferedWriter bw = new BufferedWriter(fw)) { try (BufferedWriter bw = new BufferedWriter(fw)) {
bw.write(wrapperVersion); bw.write(wrapperVersion);