mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-24 15:51:49 +01:00
Allow rootdir to be used as a argument
This commit is contained in:
parent
e043cb5690
commit
c11887fada
@ -43,15 +43,16 @@ val systemTray by lazy { systemTray() }
|
||||
|
||||
val androidCompat by lazy { AndroidCompat() }
|
||||
|
||||
fun applicationSetup(rootDir: String? = null) {
|
||||
fun applicationSetup() {
|
||||
val rootDir: String? = System.getProperty("ir.armor.tachidesk.rootDir")
|
||||
val dirs = if (rootDir != null) {
|
||||
ApplicationDirs(rootDir)
|
||||
} else {
|
||||
ApplicationDirs()
|
||||
ApplicationDirs().also {
|
||||
System.setProperty("ir.armor.tachidesk.rootDir", it.dataRoot)
|
||||
}
|
||||
}
|
||||
|
||||
System.setProperty("ir.armor.tachidesk.rootDir", dirs.dataRoot)
|
||||
|
||||
// make dirs we need
|
||||
listOf(
|
||||
dirs.dataRoot,
|
||||
|
@ -41,7 +41,8 @@ class TestExtensions {
|
||||
@BeforeAll
|
||||
fun setup() {
|
||||
val dataRoot = File("tmp/TestDesk").absolutePath
|
||||
applicationSetup(dataRoot)
|
||||
System.setProperty("ir.armor.tachidesk.rootDir", dataRoot)
|
||||
applicationSetup()
|
||||
setLoggingEnabled(false)
|
||||
runBlocking {
|
||||
extensions = getExtensionList()
|
||||
|
Loading…
Reference in New Issue
Block a user