try fix third-party cache path

This commit is contained in:
luvletter2333 2022-07-10 15:26:20 +08:00
parent b2a57d7c02
commit c71f3240a3
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
1 changed files with 2 additions and 4 deletions

View File

@ -54,13 +54,11 @@ object EnvUtil {
// https://github.com/NekoX-Dev/NekoX/issues/284
NekoConfig.cachePath.setConfigString(availableDirectories[2]);
}
var telegramPath = File(NekoConfig.cachePath.String())
if (telegramPath.isDirectory || telegramPath.mkdirs()) {
return telegramPath
} else {
NekoConfig.cachePath.setConfigString(availableDirectories[2])
}
// fallback