aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/resolvers
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-09-24 14:16:13 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-11-27 03:15:02 +0100
commitdc179bf9a649d925e7e64dbcaf52a2187416a1d5 (patch)
treec86de1bd76fae760e21380b5e99767ec45c82f32 /plugins/base/src/main/kotlin/resolvers
parent52f64c664573567259f8f678d32924f86b4f147c (diff)
downloaddokka-dc179bf9a649d925e7e64dbcaf52a2187416a1d5.tar.gz
dokka-dc179bf9a649d925e7e64dbcaf52a2187416a1d5.tar.bz2
dokka-dc179bf9a649d925e7e64dbcaf52a2187416a1d5.zip
Implement basic link resolution
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers')
-rw-r--r--plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt b/plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt
index c1b76a3b..8d3b7521 100644
--- a/plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt
+++ b/plugins/base/src/main/kotlin/resolvers/shared/PackageList.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.base.resolvers.shared
import org.jetbrains.dokka.base.renderers.PackageListService
+import java.io.File
import java.net.URL
data class PackageList(
@@ -14,6 +15,9 @@ data class PackageList(
if (offlineMode && url.protocol.toLowerCase() != "file")
return null
+ if (!File(url.file).isFile)
+ return null
+
val packageListStream = url.readContent()
val (params, packages) = packageListStream