fix: use correct directory

This commit is contained in:
Ax333l 2023-07-01 16:02:34 +02:00
parent a9606728bf
commit 3b65cd0edc
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class KeystoreManager(app: Application, private val prefs: PreferencesManager) {
const val FLUTTER_MANAGER_PASSWORD = "s3cur3p@ssw0rd"
}
private val keystorePath = app.dataDir.resolve("manager.keystore").toPath()
private val keystorePath = app.filesDir.resolve("manager.keystore").toPath()
private fun options(
cn: String = prefs.keystoreCommonName!!,
pass: String = prefs.keystorePass!!

View File

@ -20,7 +20,7 @@ import java.io.File
import java.io.InputStream
class SourceRepository(app: Application, private val persistenceRepo: SourcePersistenceRepository) {
private val sourcesDir = app.dataDir.resolve("sources").also { it.mkdirs() }
private val sourcesDir = app.filesDir.resolve("sources").also { it.mkdirs() }
private val _sources: MutableStateFlow<Map<Int, Source>> = MutableStateFlow(emptyMap())
val sources = _sources.map { it.values.toList() }