mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2025-04-03 13:53:34 +03:00
Merge 51ec7d0388
into 19cc82e0db
This commit is contained in:
commit
ece2b1d823
2 changed files with 4 additions and 4 deletions
|
@ -56,7 +56,7 @@ class LogsActivity : BaseActivity<LogsDesign>() {
|
|||
}
|
||||
|
||||
private fun loadFiles(): List<LogFile> {
|
||||
val list = cacheDir.resolve("logs").listFiles()?.toList() ?: emptyList()
|
||||
val list = logsDir.listFiles()?.toList() ?: emptyList()
|
||||
|
||||
return list.mapNotNull { LogFile.parseFromFileName(it.name) }
|
||||
}
|
||||
|
@ -64,4 +64,4 @@ class LogsActivity : BaseActivity<LogsDesign>() {
|
|||
private fun deleteAllLogs() {
|
||||
logsDir.deleteRecursively()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.content.Context
|
|||
import java.io.File
|
||||
|
||||
val Context.logsDir: File
|
||||
get() = cacheDir.resolve("logs")
|
||||
get() = getExternalFilesDir(null)?.resolve("logs") ?: cacheDir.resolve("logs")
|
||||
|
||||
val Context.clashDir: File
|
||||
get() = filesDir.resolve("clash")
|
||||
get() = filesDir.resolve("clash")
|
||||
|
|
Loading…
Add table
Reference in a new issue