This is better.

This commit is contained in:
Aria Moradi
2021-04-04 03:37:00 +04:30
parent 7a52e19235
commit 177c971b52
6 changed files with 28 additions and 23 deletions
@@ -9,9 +9,10 @@ import net.harawata.appdirs.AppDirsFactory
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
fun tachideskRootDir(): String {
return System.getProperty(
"ir.armor.tachidesk.rootDir",
AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null)
)
}
val ApplicationRootDir: String
get(): String {
return System.getProperty(
"ir.armor.tachidesk.rootDir",
AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null)
)
}
@@ -46,7 +46,7 @@ open class ConfigManager {
//Load user config
val userConfig =
File(tachideskRootDir(), "server.conf").let {
File(ApplicationRootDir, "server.conf").let {
ConfigFactory.parseFile(it)
}