mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-24 14:30:09 +08:00
[core] Fix cache directory resolving
This commit is contained in:
parent
c685a77c68
commit
ff74129974
@ -20,6 +20,11 @@ import kotlin.jvm.JvmName
|
||||
|
||||
internal expect val BotConfiguration.workingDirPath: String
|
||||
|
||||
/*
|
||||
Note: Required the written path,
|
||||
NOT the resolved (absolute) path.
|
||||
See: #2160
|
||||
*/
|
||||
internal expect val BotConfiguration.cacheDirPath: String
|
||||
|
||||
internal fun BotConfiguration.actualCacheDir(): MiraiFile = MiraiFile.create(workingDirPath).resolveMkdir(cacheDirPath)
|
||||
|
@ -15,4 +15,4 @@ internal actual val BotConfiguration.workingDirPath: String
|
||||
get() = workingDir.absolutePath
|
||||
|
||||
internal actual val BotConfiguration.cacheDirPath: String
|
||||
get() = cacheDir.absolutePath
|
||||
get() = cacheDir.path
|
Loading…
Reference in New Issue
Block a user