Skip to content

Commit

Permalink
fix: path
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Jan 27, 2022
1 parent 5f0f8b9 commit eeb96b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/xyz/cssxsh/mirai/plugin/MiraiDevicePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ public object MiraiDevicePlugin : KotlinPlugin(

with(dataFolder.resolve("models.json")) {
if (exists().not()) {
writeText(getResource("models.json") ?: throw NoSuchElementException("models.json"))
writeText(getResource("xyz/cssxsh/mirai/plugin/models.json") ?: throw NoSuchElementException("models.json"))
}
generator.models = json.decodeFromString(readText())
}

with(dataFolder.resolve("sdks.json")) {
if (exists().not()) {
writeText(getResource("sdks.json") ?: throw NoSuchElementException("sdks.json"))
writeText(getResource("xyz/cssxsh/mirai/plugin/sdks.json") ?: throw NoSuchElementException("sdks.json"))
}
generator.sdks = json.decodeFromString(readText())
}

with(dataFolder.resolve("mac.json")) {
if (exists().not()) {
writeText(getResource("mac.json") ?: throw NoSuchElementException("mac.json"))
writeText(getResource("xyz/cssxsh/mirai/plugin/mac.json") ?: throw NoSuchElementException("mac.json"))
}
generator.addr = json.decodeFromString(readText())
}
Expand Down

0 comments on commit eeb96b1

Please sign in to comment.