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:
parent
e91598b8aa
commit
1acce0a204
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue