mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
fixed a bug where the app would not generate correct config if there is no existing config
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package net.torvald.terrarum.tests
|
||||
|
||||
import com.badlogic.gdx.utils.Json
|
||||
import com.badlogic.gdx.utils.JsonValue
|
||||
import net.torvald.terrarum.utils.JsonFetcher
|
||||
import net.torvald.terrarum.utils.JsonWriter
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@@ -68,7 +68,9 @@ fun main() {
|
||||
}
|
||||
}
|
||||
|
||||
JsonWriter.writeToFile(jsonObject, file.absolutePath)
|
||||
val writer = java.io.FileWriter(file, false)
|
||||
writer.write(Json().toJson(jsonObject))
|
||||
writer.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user