fix: use correct directory

This commit is contained in:
Ax333l 2023-07-01 16:02:34 +02:00
parent ded19bd866
commit ea3d20997c
No known key found for this signature in database
GPG Key ID: D2B4D85271127D23
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() }