# announcements


09/02/2019, 4:25 PM
Hello everyone. Experiencing an odd problem since upgrading to Kotlin 1.3.50 in a maven project Basically, I have a folder containing .otf font files which gets copied to a different folder during runtime. The code looks as follows:
Copy code
private fun copyFonts () {
        val fontsFolder = File(javaClass.getResource("../../fonts").file)
        val fontsOutput = File(options.fontOutputLocation)
        if (!fontsOutput.exists()) fontsOutput.mkdir()
        fontsFolder.copyRecursively(fontsOutput, overwrite = true) { file, exception ->
            throw IllegalStateException("Could not copy file ${file.absolutePath}. ${exception.message}")
However, the .otf files seem to get corrupted somehow during the copy. I've tried manually converting each file to a byte array and creating files manually, same problem. In a nutshell, the files in the original /fonts folder are around 90kB, once they've been copied over they are about 150kB and LaTeX no longer recognizes the file. If I manually copy the original font files over to the output folder, LaTeX compilation goes back to working normally. I just recently updated from Kotlin 1.3.31 to 1.3.50 - which is when the problem started. Any suggestions? Thank you! EDIT: Just tried by calling
from inside Kotlin - same problem. However, calling robocopy from powershell copies the files correctly Also: my .otf files seem to be the only ones affected by this.
Okay. More info: This behaviour is local to a specific project. I just made a new maven project and copied all of the source files over to the new destination and ran the project. The files copied without any issue. This is very odd
Still don't know what the problem was. After regenerating maven sources the problem fixed itself.