diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-01-24 14:41:33 +0100 |
---|---|---|
committer | Kamil Doległo <kamilok1965@users.noreply.github.com> | 2020-01-29 14:47:52 +0100 |
commit | a51a92429fd3d5e6836bf1d43244b00b92587a7d (patch) | |
tree | b39bb6b7dbfc5081da89c9398d6744868f689238 /core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt | |
parent | d1585771c34263f9fb7d9e165ddf9cd349157143 (diff) | |
download | dokka-a51a92429fd3d5e6836bf1d43244b00b92587a7d.tar.gz dokka-a51a92429fd3d5e6836bf1d43244b00b92587a7d.tar.bz2 dokka-a51a92429fd3d5e6836bf1d43244b00b92587a7d.zip |
Update kotlin compiler version to 1.3.61
Diffstat (limited to 'core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt')
-rw-r--r-- | core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt b/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt index 793f9589..bd8b9cf5 100644 --- a/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt +++ b/core/src/main/kotlin/Kotlin/ExternalDocumentationLinkResolver.kt @@ -42,7 +42,7 @@ class PackageListProvider @Inject constructor( configuration.cacheRoot == "default" -> Paths.get(System.getProperty("user.home"), ".cache", "dokka") configuration.cacheRoot != null -> Paths.get(configuration.cacheRoot) else -> null - }?.resolve("packageListCache")?.apply { createDirectories() } + }?.resolve("packageListCache")?.apply { toFile().mkdirs() } val cachedProtocols = setOf("http", "https", "ftp") @@ -105,13 +105,13 @@ class PackageListProvider @Inject constructor( val digest = MessageDigest.getInstance("SHA-256") val hash = digest.digest(packageListLink.toByteArray(Charsets.UTF_8)).toHexString() - val cacheEntry = cacheDir.resolve(hash) + val cacheEntry = cacheDir.resolve(hash).toFile() if (cacheEntry.exists()) { try { val connection = packageListUrl.doOpenConnectionToReadContent() val originModifiedDate = connection.date - val cacheDate = cacheEntry.lastModified().toMillis() + val cacheDate = cacheEntry.lastModified() if (originModifiedDate > cacheDate || originModifiedDate == 0L) { if (originModifiedDate == 0L) logger.warn("No date header for $packageListUrl, downloading anyway") |