[core] Fix cache directory resolving

This commit is contained in:
Karlatemp 2022-08-09 21:51:54 +08:00
parent c685a77c68
commit ff74129974
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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