mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-01-12 16:59:08 +01:00
fix URI exception
This commit is contained in:
parent
bb09cfddb3
commit
e3f65d2192
@ -37,7 +37,7 @@ val androidCompat by lazy { AndroidCompat() }
|
|||||||
fun applicationSetup() {
|
fun applicationSetup() {
|
||||||
// register server config
|
// register server config
|
||||||
GlobalConfigManager.registerModule(
|
GlobalConfigManager.registerModule(
|
||||||
ServerConfig.register(GlobalConfigManager.config)
|
ServerConfig.register(GlobalConfigManager.config)
|
||||||
)
|
)
|
||||||
|
|
||||||
// set application wide logging level
|
// set application wide logging level
|
||||||
@ -47,10 +47,10 @@ fun applicationSetup() {
|
|||||||
|
|
||||||
// make dirs we need
|
// make dirs we need
|
||||||
listOf(
|
listOf(
|
||||||
applicationDirs.dataRoot,
|
applicationDirs.dataRoot,
|
||||||
applicationDirs.extensionsRoot,
|
applicationDirs.extensionsRoot,
|
||||||
"${applicationDirs.extensionsRoot}/icon",
|
"${applicationDirs.extensionsRoot}/icon",
|
||||||
applicationDirs.thumbnailsRoot
|
applicationDirs.thumbnailsRoot
|
||||||
).forEach {
|
).forEach {
|
||||||
File(it).mkdirs()
|
File(it).mkdirs()
|
||||||
}
|
}
|
||||||
@ -59,9 +59,7 @@ fun applicationSetup() {
|
|||||||
try {
|
try {
|
||||||
val dataConfFile = File("${applicationDirs.dataRoot}/server.conf")
|
val dataConfFile = File("${applicationDirs.dataRoot}/server.conf")
|
||||||
if (!dataConfFile.exists()) {
|
if (!dataConfFile.exists()) {
|
||||||
val inpStream = File(
|
val inpStream = Main::class.java.getResourceAsStream("/server-reference.conf")
|
||||||
Main::class.java.getResource("/server-reference.conf").toURI()
|
|
||||||
).inputStream()
|
|
||||||
val outStream = dataConfFile.outputStream()
|
val outStream = dataConfFile.outputStream()
|
||||||
|
|
||||||
inpStream.copyTo(outStream)
|
inpStream.copyTo(outStream)
|
||||||
@ -69,7 +67,9 @@ fun applicationSetup() {
|
|||||||
inpStream.close()
|
inpStream.close()
|
||||||
outStream.close()
|
outStream.close()
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {}
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
|
||||||
makeDataBaseTables()
|
makeDataBaseTables()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user