From 6c1626827eb7010dc519884771793c44a7d7e0dc Mon Sep 17 00:00:00 2001 From: Jared Burrows Date: Wed, 16 Oct 2019 21:52:29 -0700 Subject: [PATCH] #110 - fix windows file path --- .../com/jaredsburrows/license/internal/report/HtmlReport.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt b/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt index 215fe4ba..982e29fb 100644 --- a/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt +++ b/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt @@ -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. @@ -158,9 +157,7 @@ class HtmlReport(private val projects: List) { }.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