Skip to content

Commit

Permalink
Merge pull request #112 from jaredsburrows/pr/jaredsburrows/fix-windo…
Browse files Browse the repository at this point in the history
…ws-file-separator

#110 - fix windows file path
  • Loading branch information
jaredsburrows authored Oct 17, 2019
2 parents dd731d3 + 6c16268 commit 1123a45
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import kotlinx.html.title
import kotlinx.html.ul
import kotlinx.html.unsafe
import kotlinx.html.visit
import java.io.File

/**
* Generates HTML report of projects dependencies.
Expand Down Expand Up @@ -158,9 +157,7 @@ class HtmlReport(private val projects: List<Project>) {
}.toString()

private fun getLicenseText(fileName: String): String =
HtmlReport::class.java.getResource(
"/license/$fileName".replace('/', File.separatorChar)
).readText()
HtmlReport::class.java.getResource("/license/$fileName")?.readText().orEmpty()
}

@HtmlTagMarker
Expand Down

0 comments on commit 1123a45

Please sign in to comment.