mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 20:38:40 +00:00
Ensure all file about sqlite are deleted.
This commit is contained in:
committed by
Benoit Marty
parent
8f0834afd5
commit
35dc9eebfc
+6
-9
@@ -424,15 +424,12 @@ class RustMatrixClient constructor(
|
|||||||
sessionDirectory.deleteRecursively()
|
sessionDirectory.deleteRecursively()
|
||||||
} else {
|
} else {
|
||||||
// Delete only the state.db file
|
// Delete only the state.db file
|
||||||
listOf(
|
sessionDirectory.listFiles().orEmpty()
|
||||||
"matrix-sdk-state.sqlite3",
|
.filter { it.name.contains("matrix-sdk-state") }
|
||||||
"matrix-sdk-state.sqlite3-shm",
|
.forEach { file ->
|
||||||
"matrix-sdk-state.sqlite3-wal",
|
Timber.w("Deleting file ${file.name}...")
|
||||||
).map { fileName ->
|
file.safeDelete()
|
||||||
File(sessionDirectory, fileName)
|
}
|
||||||
}.forEach { file ->
|
|
||||||
file.safeDelete()
|
|
||||||
}
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user