Skip to content

Commit

Permalink
Potential fix for exception on windows
Browse files Browse the repository at this point in the history
Related to #463
  • Loading branch information
dirkgroot committed Apr 9, 2024
1 parent af60c83 commit 73efc25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import nl.avisi.structurizr.site.generatr.site.model.*
import nl.avisi.structurizr.site.generatr.site.views.*
import java.io.File
import java.math.BigInteger
import java.nio.file.Path
import java.security.MessageDigest
import java.util.concurrent.ConcurrentHashMap

Expand Down Expand Up @@ -215,7 +214,8 @@ private fun writeHtmlFile(exportDir: File, viewModel: PageViewModel) {
}
}

val htmlFile = File(exportDir, Path.of(viewModel.url, "index.html").toString())
val subDirectory = File(exportDir, viewModel.url)
val htmlFile = File(subDirectory, "index.html")
htmlFile.parentFile.mkdirs()
htmlFile.writeText(html)

Expand Down

0 comments on commit 73efc25

Please sign in to comment.