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

Fix file saving.

This commit is contained in:
Cedric Beust 2015-10-07 20:06:17 -07:00
parent 62bef7a861
commit a12aba3518

View file

@ -127,9 +127,8 @@ public class KFiles {
public fun saveFile(file: File, text: String) { public fun saveFile(file: File, text: String) {
file.absoluteFile.parentFile.mkdirs() file.absoluteFile.parentFile.mkdirs()
file.delete() file.writeText(text)
KobaltLogger.log(2, "Wrote ${file}") KobaltLogger.log(2, "Wrote ${file}")
file.appendText(text)
} }
private fun isWindows() = System.getProperty("os.name").contains("Windows"); private fun isWindows() = System.getProperty("os.name").contains("Windows");